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

Function getFixesForAddImport

test/fixtures/snapshot/typescript.js:153406–153409  ·  view source on GitHub ↗
(exportInfos, existingImports, program, sourceFile, position, isValidTypeOnlyUseSite, useRequire, host, preferences, fromCacheOnly)

Source from the content-addressed store, hash-verified

153404 return { computedWithoutCacheCount: computedWithoutCacheCount, fixes: fixes };
153405 }
153406 function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, isValidTypeOnlyUseSite, useRequire, host, preferences, fromCacheOnly) {
153407 var existingDeclaration = ts.firstDefined(existingImports, function (info) { return newImportInfoFromExistingSpecifier(info, isValidTypeOnlyUseSite, useRequire, program.getTypeChecker(), program.getCompilerOptions()); });
153408 return existingDeclaration ? { fixes: [existingDeclaration] } : getNewImportFixes(program, sourceFile, position, isValidTypeOnlyUseSite, useRequire, exportInfos, host, preferences, fromCacheOnly);
153409 }
153410 function newImportInfoFromExistingSpecifier(_a, isValidTypeOnlyUseSite, useRequire, checker, compilerOptions) {
153411 var _b;
153412 var declaration = _a.declaration, importKind = _a.importKind, symbol = _a.symbol, targetFlags = _a.targetFlags;

Callers 1

getImportFixesFunction · 0.85

Calls 2

getNewImportFixesFunction · 0.85

Tested by

no test coverage detected