fix(49548): show completions after keywords in block (#49600)

This commit is contained in:
Oleksandr T
2022-06-20 22:52:28 +03:00
committed by GitHub
parent 7eddb3a122
commit c01afb5ef3
2 changed files with 54 additions and 0 deletions

View File

@@ -4094,6 +4094,10 @@ namespace ts.Completions {
}
break;
case SyntaxKind.Identifier: {
const originalKeywordKind = (location as Identifier).originalKeywordKind;
if (originalKeywordKind && isKeyword(originalKeywordKind)) {
return undefined;
}
// class c { public prop = c| }
if (isPropertyDeclaration(location.parent) && location.parent.initializer === location) {
return undefined;