MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getLocationOfPositionInFile

Method getLocationOfPositionInFile

compiler/companion/src/Workspace.ts:325–329  ·  view source on GitHub ↗
(file: ts.SourceFile, position: number)

Source from the content-addressed store, hash-verified

323 };
324 return transformed;
325 }
326
327 getLocationOfPositionInFile(file: ts.SourceFile, position: number): Location {
328 const lac = file.getLineAndCharacterOfPosition(position);
329 // Location is 1-indexed
330 return { line: lac.line + 1, offset: lac.character + 1 };
331 }
332

Callers 2

transformDiagnosticMethod · 0.95
makeDiagnosticMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected