mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Add 'unknown' to type keywords (#24606)
This commit is contained in:
parent
d8cea359f7
commit
2ce7e5f0cd
@ -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"],
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user