mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
added await keyword to completions and added test (#27912)
This commit is contained in:
parent
afa94c527c
commit
02c74987b7
@ -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");
|
||||
Loading…
x
Reference in New Issue
Block a user