Add 'unknown' to type keywords (#24606)

This commit is contained in:
Andy 2018-06-04 11:31:48 -07:00 committed by GitHub
parent d8cea359f7
commit 2ce7e5f0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -1196,6 +1196,7 @@ namespace ts {
SyntaxKind.VoidKeyword,
SyntaxKind.UndefinedKeyword,
SyntaxKind.UniqueKeyword,
SyntaxKind.UnknownKeyword,
];
export function isTypeKeyword(kind: SyntaxKind): boolean {

View File

@ -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"],
});