From f2d297fd1fa4fa53e66cd48c3b0d5c709063ffd5 Mon Sep 17 00:00:00 2001 From: "dreamran43@gmail.com" Date: Tue, 4 Dec 2018 02:40:43 +0800 Subject: [PATCH] Move await keyword to inside of function and test --- src/harness/fourslash.ts | 1 + src/services/completions.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 34fedccc19c..29fc1b5765b 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -4775,6 +4775,7 @@ namespace FourSlashInterface { "package", "yield", "async", + "await", ].map(keywordEntry); // TODO: many of these are inappropriate to always provide diff --git a/src/services/completions.ts b/src/services/completions.ts index c127f0c3a7b..93bea69f165 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -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 {