getSuggestionForNonexistentModule -> getSuggestionForNonexistentExport
This commit is contained in:
parent
b93845ae51
commit
32bb63cbcf
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue