Skip to content

Commit 02c7498

Browse files
fortythreesamAndy
authored andcommitted
added await keyword to completions and added test (#27912)
1 parent afa94c5 commit 02c7498

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/services/completions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2150,7 +2150,7 @@ namespace ts.Completions {
21502150
case KeywordCompletionFilters.None:
21512151
return false;
21522152
case KeywordCompletionFilters.All:
2153-
return kind === SyntaxKind.AsyncKeyword || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind) || kind === SyntaxKind.DeclareKeyword || kind === SyntaxKind.ModuleKeyword
2153+
return kind === SyntaxKind.AsyncKeyword || SyntaxKind.AwaitKeyword || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind) || kind === SyntaxKind.DeclareKeyword || kind === SyntaxKind.ModuleKeyword
21542154
|| isTypeKeyword(kind) && kind !== SyntaxKind.UndefinedKeyword;
21552155
case KeywordCompletionFilters.ClassElementKeywords:
21562156
return isClassMemberCompletionKeyword(kind);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//// /**/
2+
3+
goTo.marker("")
4+
verify.completionListContains("await");

0 commit comments

Comments
 (0)