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

Function getPreferencesForUpdate

test/fixtures/snapshot/typescript.js:121957–121964  ·  view source on GitHub ↗
(compilerOptions, oldImportSpecifier, importingSourceFileName, host)

Source from the content-addressed store, hash-verified

121955 }
121956 }
121957 function getPreferencesForUpdate(compilerOptions, oldImportSpecifier, importingSourceFileName, host) {
121958 return {
121959 relativePreference: ts.isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* RelativePreference.Relative */ : 1 /* RelativePreference.NonRelative */,
121960 ending: ts.hasJSFileExtension(oldImportSpecifier) || isFormatRequiringExtensions(compilerOptions, importingSourceFileName, host) ?
121961 2 /* Ending.JsExtension */ :
121962 ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeJs || ts.endsWith(oldImportSpecifier, "index") ? 1 /* Ending.Index */ : 0 /* Ending.Minimal */,
121963 };
121964 }
121965 function isFormatRequiringExtensions(compilerOptions, importingSourceFileName, host) {
121966 var _a;
121967 if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16

Callers 1

updateModuleSpecifierFunction · 0.85

Calls 1

Tested by

no test coverage detected