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

Function createImportSpecifierResolver

test/fixtures/snapshot/typescript.js:153068–153078  ·  view source on GitHub ↗
(importingFile, program, host, preferences)

Source from the content-addressed store, hash-verified

153066 }
153067 }
153068 function createImportSpecifierResolver(importingFile, program, host, preferences) {
153069 var packageJsonImportFilter = ts.createPackageJsonImportFilter(importingFile, preferences, host);
153070 var importMap = createExistingImportMap(program.getTypeChecker(), importingFile, program.getCompilerOptions());
153071 return { getModuleSpecifierForBestExportInfo: getModuleSpecifierForBestExportInfo };
153072 function getModuleSpecifierForBestExportInfo(exportInfo, symbolName, position, isValidTypeOnlyUseSite, fromCacheOnly) {
153073 var _a = getImportFixes(exportInfo, { symbolName: symbolName, position: position }, isValidTypeOnlyUseSite,
153074 /*useRequire*/ false, program, importingFile, host, preferences, importMap, fromCacheOnly), fixes = _a.fixes, computedWithoutCacheCount = _a.computedWithoutCacheCount;
153075 var result = getBestFix(fixes, importingFile, program, packageJsonImportFilter, host);
153076 return result && __assign(__assign({}, result), { computedWithoutCacheCount: computedWithoutCacheCount });
153077 }
153078 }
153079 codefix.createImportSpecifierResolver = createImportSpecifierResolver;
153080 // Sorted with the preferred fix coming first.
153081 var ImportFixKind;

Callers

nothing calls this directly

Calls 1

createExistingImportMapFunction · 0.85

Tested by

no test coverage detected