Add as
completions (#36359)
This commit is contained in:
parent
75f88eee48
commit
ef5573b266
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
5
tests/cases/fourslash/completionTypeAssertion.ts
Normal file
5
tests/cases/fourslash/completionTypeAssertion.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// var x = this as/*1*/
|
||||
|
||||
verify.completions({marker: "1", exact: completion.globalsPlus(["x"]) })
|
Loading…
Reference in a new issue