Move await keyword to inside of function and test

This commit is contained in:
dreamran43@gmail.com
2018-12-04 12:39:42 -08:00
committed by Sheetal Nandi
parent 5d8342b0ad
commit 33c3597b42
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -4908,6 +4908,7 @@ namespace FourSlashInterface {
"package",
"yield",
"async",
"await",
].map(keywordEntry);
export const globalKeywordsPlusUndefined: ReadonlyArray<ExpectedCompletionEntryObject> = (() => {
+1 -1
View File
@@ -1957,7 +1957,7 @@ namespace ts.Completions {
}
function isFunctionLikeBodyKeyword(kind: SyntaxKind) {
return kind === SyntaxKind.AsyncKeyword || SyntaxKind.AwaitKeyword || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
return kind === SyntaxKind.AsyncKeyword || kind === SyntaxKind.AwaitKeyword || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
}
function keywordForNode(node: Node): SyntaxKind {
@@ -16,7 +16,7 @@
verify.completions(
{
marker: ["1", "2"],
includes: "async",
includes: ["async", "await"],
excludes: ["public", "private", "protected", "constructor", "readonly", "static", "abstract", "get", "set"],
},
{ marker: ["3", "4"], exact: completion.classElementKeywords, isNewIdentifierLocation: true },