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

Function hasJsonModuleEmitEnabled

test/fixtures/snapshot/typescript.js:20284–20298  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

20282 }
20283 ts.getEmitModuleDetectionKind = getEmitModuleDetectionKind;
20284 function hasJsonModuleEmitEnabled(options) {
20285 switch (getEmitModuleKind(options)) {
20286 case ts.ModuleKind.CommonJS:
20287 case ts.ModuleKind.AMD:
20288 case ts.ModuleKind.ES2015:
20289 case ts.ModuleKind.ES2020:
20290 case ts.ModuleKind.ES2022:
20291 case ts.ModuleKind.ESNext:
20292 case ts.ModuleKind.Node16:
20293 case ts.ModuleKind.NodeNext:
20294 return true;
20295 default:
20296 return false;
20297 }
20298 }
20299 ts.hasJsonModuleEmitEnabled = hasJsonModuleEmitEnabled;
20300 function unreachableCodeIsError(options) {
20301 return options.allowUnreachableCode === false;

Callers

nothing calls this directly

Calls 1

getEmitModuleKindFunction · 0.85

Tested by

no test coverage detected