MCPcopy Index your code
hub / github.com/nodejs/node / tryGetSourcePosition

Function tryGetSourcePosition

test/fixtures/snapshot/typescript.js:144568–144576  ·  view source on GitHub ↗
(info)

Source from the content-addressed store, hash-verified

144566 return mapper || ts.identitySourceMapConsumer;
144567 }
144568 function tryGetSourcePosition(info) {
144569 if (!ts.isDeclarationFileName(info.fileName))
144570 return undefined;
144571 var file = getSourceFile(info.fileName);
144572 if (!file)
144573 return undefined;
144574 var newLoc = getDocumentPositionMapper(info.fileName).getSourcePosition(info);
144575 return !newLoc || newLoc === info ? undefined : tryGetSourcePosition(newLoc) || newLoc;
144576 }
144577 function tryGetGeneratedPosition(info) {
144578 if (ts.isDeclarationFileName(info.fileName))
144579 return undefined;

Callers

nothing calls this directly

Calls 2

getSourceFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…