Skip to content

Commit ef5573b

Browse files
authored
Add as completions (#36359)
1 parent 75f88ee commit ef5573b

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/harness/fourslashInterfaceImpl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,7 @@ namespace FourSlashInterface {
11521152
"let",
11531153
"package",
11541154
"yield",
1155+
"as",
11551156
"asserts",
11561157
"any",
11571158
"async",
@@ -1352,6 +1353,7 @@ namespace FourSlashInterface {
13521353
"let",
13531354
"package",
13541355
"yield",
1356+
"as",
13551357
"asserts",
13561358
"any",
13571359
"async",

src/services/completions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,6 +2461,7 @@ namespace ts.Completions {
24612461
|| kind === SyntaxKind.ModuleKeyword
24622462
|| kind === SyntaxKind.TypeKeyword
24632463
|| kind === SyntaxKind.NamespaceKeyword
2464+
|| kind === SyntaxKind.AsKeyword
24642465
|| isTypeKeyword(kind) && kind !== SyntaxKind.UndefinedKeyword;
24652466
case KeywordCompletionFilters.FunctionLikeBodyKeywords:
24662467
return isFunctionLikeBodyKeyword(kind);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
//// var x = this as/*1*/
4+
5+
verify.completions({marker: "1", exact: completion.globalsPlus(["x"]) })

0 commit comments

Comments
 (0)