mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Add 'unknown' to type keywords (#24606)
This commit is contained in:
@@ -1196,6 +1196,7 @@ namespace ts {
|
||||
SyntaxKind.VoidKeyword,
|
||||
SyntaxKind.UndefinedKeyword,
|
||||
SyntaxKind.UniqueKeyword,
|
||||
SyntaxKind.UnknownKeyword,
|
||||
];
|
||||
|
||||
export function isTypeKeyword(kind: SyntaxKind): boolean {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @noLib: true
|
||||
|
||||
////type T = /**/
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("undefined", "undefined", undefined, "keyword");
|
||||
verify.not.completionListContains("await");
|
||||
verify.completions({
|
||||
marker: "",
|
||||
exact: ["T", "null", "void", "any", "boolean", "keyof", "never", "number", "object", "string", "symbol", "undefined", "unique", "unknown"],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user