mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-12 01:48:33 -05:00
added await keyword to completions and added test (#27912)
This commit is contained in:
@@ -2150,7 +2150,7 @@ namespace ts.Completions {
|
||||
case KeywordCompletionFilters.None:
|
||||
return false;
|
||||
case KeywordCompletionFilters.All:
|
||||
return kind === SyntaxKind.AsyncKeyword || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind) || kind === SyntaxKind.DeclareKeyword || kind === SyntaxKind.ModuleKeyword
|
||||
return kind === SyntaxKind.AsyncKeyword || SyntaxKind.AwaitKeyword || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind) || kind === SyntaxKind.DeclareKeyword || kind === SyntaxKind.ModuleKeyword
|
||||
|| isTypeKeyword(kind) && kind !== SyntaxKind.UndefinedKeyword;
|
||||
case KeywordCompletionFilters.ClassElementKeywords:
|
||||
return isClassMemberCompletionKeyword(kind);
|
||||
|
||||
4
tests/cases/fourslash/completionAwaitKeyword.ts
Normal file
4
tests/cases/fourslash/completionAwaitKeyword.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
//// /**/
|
||||
|
||||
goTo.marker("")
|
||||
verify.completionListContains("await");
|
||||
Reference in New Issue
Block a user