Move await keyword to inside of function and test

This commit is contained in:
dreamran43@gmail.com
2018-12-04 02:40:43 +08:00
parent 8eefaf48f5
commit f2d297fd1f
2 changed files with 2 additions and 1 deletions

View File

@@ -4775,6 +4775,7 @@ namespace FourSlashInterface {
"package",
"yield",
"async",
"await",
].map(keywordEntry);
// TODO: many of these are inappropriate to always provide

View File

@@ -1957,7 +1957,7 @@ namespace ts.Completions {
}
function isFunctionLikeBodyKeyword(kind: SyntaxKind) {
return kind === SyntaxKind.AsyncKeyword || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
return kind === SyntaxKind.AsyncKeyword || SyntaxKind.AwaitKeyword || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
}
function keywordForNode(node: Node): SyntaxKind {