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

Function getSourceFileOfNode

test/fixtures/snapshot/typescript.js:14525–14530  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

14523 }
14524 }
14525 function getSourceFileOfNode(node) {
14526 while (node && node.kind !== 305 /* SyntaxKind.SourceFile */) {
14527 node = node.parent;
14528 }
14529 return node;
14530 }
14531 ts.getSourceFileOfNode = getSourceFileOfNode;
14532 function getSourceFileOfModule(module) {
14533 return getSourceFileOfNode(module.valueDeclaration || getNonAugmentationDeclaration(module));

Callers 7

getSourceFileOfModuleFunction · 0.85
nodePosToStringFunction · 0.85
getTokenPosOfNodeFunction · 0.85
getTextOfNodeFunction · 0.85
createDiagnosticForNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…