Skip to content

Commit 2ce7e5f

Browse files
author
Andy
authored
Add 'unknown' to type keywords (#24606)
1 parent d8cea35 commit 2ce7e5f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/services/utilities.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,7 @@ namespace ts {
11961196
SyntaxKind.VoidKeyword,
11971197
SyntaxKind.UndefinedKeyword,
11981198
SyntaxKind.UniqueKeyword,
1199+
SyntaxKind.UnknownKeyword,
11991200
];
12001201

12011202
export function isTypeKeyword(kind: SyntaxKind): boolean {
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
/// <reference path="fourslash.ts" />
22

3+
// @noLib: true
4+
35
////type T = /**/
46

5-
goTo.marker();
6-
verify.completionListContains("undefined", "undefined", undefined, "keyword");
7-
verify.not.completionListContains("await");
7+
verify.completions({
8+
marker: "",
9+
exact: ["T", "null", "void", "any", "boolean", "keyof", "never", "number", "object", "string", "symbol", "undefined", "unique", "unknown"],
10+
});

0 commit comments

Comments
 (0)