diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ab187f57c4..671dbdcf90 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -295,7 +295,7 @@ namespace ts { getAllPossiblePropertiesOfTypes, getSuggestionForNonexistentProperty: (node, type) => getSuggestionForNonexistentProperty(node, type), getSuggestionForNonexistentSymbol: (location, name, meaning) => getSuggestionForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning), - getSuggestionForNonexistentModule: (node, target) => getSuggestionForNonexistentModule(node, target), + getSuggestionForNonexistentExport: (node, target) => getSuggestionForNonexistentExport(node, target), getBaseConstraintOfType, getDefaultFromTypeParameter: type => type && type.flags & TypeFlags.TypeParameter ? getDefaultFromTypeParameter(type as TypeParameter) : undefined, resolveName(name, location, meaning, excludeGlobals) { @@ -17787,7 +17787,7 @@ namespace ts { return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), SymbolFlags.ModuleMember); } - function getSuggestionForNonexistentModule(name: Identifier, targetModule: Symbol): string | undefined { + function getSuggestionForNonexistentExport(name: Identifier, targetModule: Symbol): string | undefined { const suggestion = getSuggestedSymbolForNonexistentModule(name, targetModule); return suggestion && symbolName(suggestion); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d096cba6c5..b8d33b6b3f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2996,7 +2996,7 @@ namespace ts { getApparentType(type: Type): Type; getSuggestionForNonexistentProperty(name: Identifier | string, containingType: Type): string | undefined; getSuggestionForNonexistentSymbol(location: Node, name: string, meaning: SymbolFlags): string | undefined; - getSuggestionForNonexistentModule(node: Identifier, target: Symbol): string | undefined; + getSuggestionForNonexistentExport(node: Identifier, target: Symbol): string | undefined; getBaseConstraintOfType(type: Type): Type | undefined; getDefaultFromTypeParameter(type: Type): Type | undefined; diff --git a/src/services/codefixes/fixSpelling.ts b/src/services/codefixes/fixSpelling.ts index fbe3953c1b..d504cefd86 100644 --- a/src/services/codefixes/fixSpelling.ts +++ b/src/services/codefixes/fixSpelling.ts @@ -43,7 +43,7 @@ namespace ts.codefix { const importDeclaration = findAncestor(node, isImportDeclaration)!; const resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration); if (resolvedSourceFile && resolvedSourceFile.symbol) { - suggestion = checker.getSuggestionForNonexistentModule(node as Identifier, resolvedSourceFile.symbol); + suggestion = checker.getSuggestionForNonexistentExport(node as Identifier, resolvedSourceFile.symbol); } } else {