Add as completions (#36359)

This commit is contained in:
Nathan Shively-Sanders 2020-01-23 08:29:06 -08:00 committed by GitHub
parent 75f88eee48
commit ef5573b266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View file

@ -1152,6 +1152,7 @@ namespace FourSlashInterface {
"let",
"package",
"yield",
"as",
"asserts",
"any",
"async",
@ -1352,6 +1353,7 @@ namespace FourSlashInterface {
"let",
"package",
"yield",
"as",
"asserts",
"any",
"async",

View file

@ -2461,6 +2461,7 @@ namespace ts.Completions {
|| kind === SyntaxKind.ModuleKeyword
|| kind === SyntaxKind.TypeKeyword
|| kind === SyntaxKind.NamespaceKeyword
|| kind === SyntaxKind.AsKeyword
|| isTypeKeyword(kind) && kind !== SyntaxKind.UndefinedKeyword;
case KeywordCompletionFilters.FunctionLikeBodyKeywords:
return isFunctionLikeBodyKeyword(kind);

View file

@ -0,0 +1,5 @@
/// <reference path="fourslash.ts" />
//// var x = this as/*1*/
verify.completions({marker: "1", exact: completion.globalsPlus(["x"]) })