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

Function getOutputExtension

test/fixtures/snapshot/typescript.js:110075–110081  ·  view source on GitHub ↗
(fileName, options)

Source from the content-addressed store, hash-verified

110073 }
110074 /* @internal */
110075 function getOutputExtension(fileName, options) {
110076 return ts.fileExtensionIs(fileName, ".json" /* Extension.Json */) ? ".json" /* Extension.Json */ :
110077 options.jsx === 1 /* JsxEmit.Preserve */ && ts.fileExtensionIsOneOf(fileName, [".jsx" /* Extension.Jsx */, ".tsx" /* Extension.Tsx */]) ? ".jsx" /* Extension.Jsx */ :
110078 ts.fileExtensionIsOneOf(fileName, [".mts" /* Extension.Mts */, ".mjs" /* Extension.Mjs */]) ? ".mjs" /* Extension.Mjs */ :
110079 ts.fileExtensionIsOneOf(fileName, [".cts" /* Extension.Cts */, ".cjs" /* Extension.Cjs */]) ? ".cjs" /* Extension.Cjs */ :
110080 ".js" /* Extension.Js */;
110081 }
110082 ts.getOutputExtension = getOutputExtension;
110083 function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir, getCommonSourceDirectory) {
110084 return outputDir ?

Callers 2

getOutputPathsForFunction · 0.85
getOutputJSFileNameFunction · 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…