mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Merge pull request #12543 from wonderful-panda/fix-12536
tsserver: get candidates from <K extends keyof Foo> (fix #12536)
This commit is contained in:
@@ -114,7 +114,8 @@ namespace ts {
|
||||
// we deliberately exclude augmentations
|
||||
// since we are only interested in declarations of the module itself
|
||||
return tryFindAmbientModule(moduleName, /*withAugmentations*/ false);
|
||||
}
|
||||
},
|
||||
getApparentType
|
||||
};
|
||||
|
||||
const tupleTypes: GenericType[] = [];
|
||||
|
||||
@@ -2372,6 +2372,7 @@ namespace ts {
|
||||
getAmbientModules(): Symbol[];
|
||||
|
||||
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
|
||||
getApparentType(type: Type): Type;
|
||||
|
||||
/* @internal */ tryFindAmbientModuleWithoutAugmentations(moduleName: string): Symbol;
|
||||
|
||||
|
||||
@@ -244,6 +244,9 @@ namespace ts.Completions {
|
||||
}
|
||||
|
||||
function addStringLiteralCompletionsFromType(type: Type, result: CompletionEntry[]): void {
|
||||
if (type && type.flags & TypeFlags.TypeParameter) {
|
||||
type = typeChecker.getApparentType(type);
|
||||
}
|
||||
if (!type) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user