Skip to content

Commit 32bb63c

Browse files
getSuggestionForNonexistentModule -> getSuggestionForNonexistentExport
1 parent b93845a commit 32bb63c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ namespace ts {
295295
getAllPossiblePropertiesOfTypes,
296296
getSuggestionForNonexistentProperty: (node, type) => getSuggestionForNonexistentProperty(node, type),
297297
getSuggestionForNonexistentSymbol: (location, name, meaning) => getSuggestionForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),
298-
getSuggestionForNonexistentModule: (node, target) => getSuggestionForNonexistentModule(node, target),
298+
getSuggestionForNonexistentExport: (node, target) => getSuggestionForNonexistentExport(node, target),
299299
getBaseConstraintOfType,
300300
getDefaultFromTypeParameter: type => type && type.flags & TypeFlags.TypeParameter ? getDefaultFromTypeParameter(type as TypeParameter) : undefined,
301301
resolveName(name, location, meaning, excludeGlobals) {
@@ -17787,7 +17787,7 @@ namespace ts {
1778717787
return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), SymbolFlags.ModuleMember);
1778817788
}
1778917789

17790-
function getSuggestionForNonexistentModule(name: Identifier, targetModule: Symbol): string | undefined {
17790+
function getSuggestionForNonexistentExport(name: Identifier, targetModule: Symbol): string | undefined {
1779117791
const suggestion = getSuggestedSymbolForNonexistentModule(name, targetModule);
1779217792
return suggestion && symbolName(suggestion);
1779317793
}

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2996,7 +2996,7 @@ namespace ts {
29962996
getApparentType(type: Type): Type;
29972997
getSuggestionForNonexistentProperty(name: Identifier | string, containingType: Type): string | undefined;
29982998
getSuggestionForNonexistentSymbol(location: Node, name: string, meaning: SymbolFlags): string | undefined;
2999-
getSuggestionForNonexistentModule(node: Identifier, target: Symbol): string | undefined;
2999+
getSuggestionForNonexistentExport(node: Identifier, target: Symbol): string | undefined;
30003000
getBaseConstraintOfType(type: Type): Type | undefined;
30013001
getDefaultFromTypeParameter(type: Type): Type | undefined;
30023002

src/services/codefixes/fixSpelling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace ts.codefix {
4343
const importDeclaration = findAncestor(node, isImportDeclaration)!;
4444
const resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration);
4545
if (resolvedSourceFile && resolvedSourceFile.symbol) {
46-
suggestion = checker.getSuggestionForNonexistentModule(node as Identifier, resolvedSourceFile.symbol);
46+
suggestion = checker.getSuggestionForNonexistentExport(node as Identifier, resolvedSourceFile.symbol);
4747
}
4848
}
4949
else {

0 commit comments

Comments
 (0)