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

Function isSourceFileDefaultLibrary

test/fixtures/snapshot/typescript.js:117484–117503  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

117482 return !!sourceFilesFoundSearchingNodeModules.get(file.path);
117483 }
117484 function isSourceFileDefaultLibrary(file) {
117485 if (!file.isDeclarationFile) {
117486 return false;
117487 }
117488 if (file.hasNoDefaultLib) {
117489 return true;
117490 }
117491 if (!options.noLib) {
117492 return false;
117493 }
117494 // If '--lib' is not specified, include default library file according to '--target'
117495 // otherwise, using options specified in '--lib' instead of '--target' default library file
117496 var equalityComparer = host.useCaseSensitiveFileNames() ? ts.equateStringsCaseSensitive : ts.equateStringsCaseInsensitive;
117497 if (!options.lib) {
117498 return equalityComparer(file.fileName, getDefaultLibraryFileName());
117499 }
117500 else {
117501 return ts.some(options.lib, function (libFileName) { return equalityComparer(file.fileName, pathForLibFile(libFileName)); });
117502 }
117503 }
117504 function getTypeChecker() {
117505 return typeChecker || (typeChecker = ts.createTypeChecker(program));
117506 }

Callers

nothing calls this directly

Calls 2

pathForLibFileFunction · 0.85
someMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…