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

Function findSourceFile

test/fixtures/snapshot/typescript.js:118190–118199  ·  view source on GitHub ↗
(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId)

Source from the content-addressed store, hash-verified

118188 }
118189 // Get source file from normalized fileName
118190 function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
118191 ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* tracing.Phase.Program */, "findSourceFile", {
118192 fileName: fileName,
118193 isDefaultLib: isDefaultLib || undefined,
118194 fileIncludeKind: ts.FileIncludeKind[reason.kind],
118195 });
118196 var result = findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
118197 ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
118198 return result;
118199 }
118200 function getCreateSourceFileOptions(fileName, moduleResolutionCache, host, options) {
118201 // It's a _little odd_ that we can't set `impliedNodeFormat` until the program step - but it's the first and only time we have a resolution cache
118202 // and a freshly made source file node on hand at the same time, and we need both to set the field. Persisting the resolution cache all the way

Callers 3

processSourceFileFunction · 0.85
findSourceFileWorkerFunction · 0.85
processImportedModulesFunction · 0.85

Calls 3

findSourceFileWorkerFunction · 0.85
popMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…