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

Function updateModuleSpecifier

test/fixtures/snapshot/typescript.js:121988–121994  ·  view source on GitHub ↗
(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier, options)

Source from the content-addressed store, hash-verified

121986 // while `importingSourceFileName` its *new* name. We need a source file just to get its
121987 // `impliedNodeFormat` and to detect certain preferences from existing import module specifiers.
121988 function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, oldImportSpecifier, options) {
121989 if (options === void 0) { options = {}; }
121990 var res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getPreferencesForUpdate(compilerOptions, oldImportSpecifier, importingSourceFileName, host), {}, options);
121991 if (res === oldImportSpecifier)
121992 return undefined;
121993 return res;
121994 }
121995 moduleSpecifiers_1.updateModuleSpecifier = updateModuleSpecifier;
121996 // `importingSourceFile` and `importingSourceFileName`? Why not just use `importingSourceFile.path`?
121997 // Because when this is called by the declaration emitter, `importingSourceFile` is the implementation

Callers

nothing calls this directly

Calls 2

getModuleSpecifierWorkerFunction · 0.85
getPreferencesForUpdateFunction · 0.85

Tested by

no test coverage detected