Merge pull request #12543 from wonderful-panda/fix-12536

tsserver: get candidates from <K extends keyof Foo> (fix #12536)
This commit is contained in:
Mohamed Hegazy
2016-12-30 13:23:07 -08:00
committed by GitHub
4 changed files with 21 additions and 1 deletions
+3
View File
@@ -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;
}