location
import type { Node as ts_Node } from "typescript/ast"; export function location(node: ts_Node): string { const sf = node.getSourceFile(); const { line, character } = sf.getLineAndCharacterOfPosition(node.getStart(sf)); return `${sf.fileName}:${line + 1}:${character + 1}`; }