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

Function getOutputPathsFor

test/fixtures/snapshot/typescript.js:110052–110069  ·  view source on GitHub ↗
(sourceFile, host, forceDtsPaths)

Source from the content-addressed store, hash-verified

110050 ts.getOutputPathsForBundle = getOutputPathsForBundle;
110051 /*@internal*/
110052 function getOutputPathsFor(sourceFile, host, forceDtsPaths) {
110053 var options = host.getCompilerOptions();
110054 if (sourceFile.kind === 306 /* SyntaxKind.Bundle */) {
110055 return getOutputPathsForBundle(options, forceDtsPaths);
110056 }
110057 else {
110058 var ownOutputFilePath = ts.getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options));
110059 var isJsonFile = ts.isJsonSourceFile(sourceFile);
110060 // If json file emits to the same location skip writing it, if emitDeclarationOnly skip writing it
110061 var isJsonEmittedToSameLocation = isJsonFile &&
110062 ts.comparePaths(sourceFile.fileName, ownOutputFilePath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* Comparison.EqualTo */;
110063 var jsFilePath = options.emitDeclarationOnly || isJsonEmittedToSameLocation ? undefined : ownOutputFilePath;
110064 var sourceMapFilePath = !jsFilePath || ts.isJsonSourceFile(sourceFile) ? undefined : getSourceMapFilePath(jsFilePath, options);
110065 var declarationFilePath = (forceDtsPaths || (ts.getEmitDeclarations(options) && !isJsonFile)) ? ts.getDeclarationEmitOutputFilePath(sourceFile.fileName, host) : undefined;
110066 var declarationMapPath = declarationFilePath && ts.getAreDeclarationMapsEnabled(options) ? declarationFilePath + ".map" : undefined;
110067 return { jsFilePath: jsFilePath, sourceMapFilePath: sourceMapFilePath, declarationFilePath: declarationFilePath, declarationMapPath: declarationMapPath, buildInfoPath: undefined };
110068 }
110069 }
110070 ts.getOutputPathsFor = getOutputPathsFor;
110071 function getSourceMapFilePath(jsFilePath, options) {
110072 return (options.sourceMap && !options.inlineSourceMap) ? jsFilePath + ".map" : undefined;

Callers 1

forEachEmittedFileFunction · 0.85

Calls 3

getOutputPathsForBundleFunction · 0.85
getOutputExtensionFunction · 0.85
getSourceMapFilePathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…