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

Function sourceFileMayBeEmitted

test/fixtures/snapshot/typescript.js:18487–18494  ·  view source on GitHub ↗

Don't call this for `--outFile`, just for `--outDir` or plain emit. `--outFile` needs additional checks.

(sourceFile, host, forceDtsEmit)

Source from the content-addressed store, hash-verified

18485 ts.getSourceFilesToEmit = getSourceFilesToEmit;
18486 /** Don't call this for `--outFile`, just for `--outDir` or plain emit. `--outFile` needs additional checks. */
18487 function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
18488 var options = host.getCompilerOptions();
18489 return !(options.noEmitForJsFiles && isSourceFileJS(sourceFile)) &&
18490 !sourceFile.isDeclarationFile &&
18491 !host.isSourceFileFromExternalLibrary(sourceFile) &&
18492 (forceDtsEmit || (!(isJsonSourceFile(sourceFile) && host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) &&
18493 !host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)));
18494 }
18495 ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
18496 function getSourceFilePathInNewDir(fileName, host, newDirPath) {
18497 return getSourceFilePathInNewDirWorker(fileName, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), function (f) { return host.getCanonicalFileName(f); });

Callers 1

getSourceFilesToEmitFunction · 0.85

Calls 2

isSourceFileJSFunction · 0.85
isJsonSourceFileFunction · 0.85

Tested by

no test coverage detected