fix(53289): TypeScript cannot auto-complete keyword typeof (#53325)

This commit is contained in:
Oleksandr T 2023-03-21 22:51:08 +02:00 committed by GitHub
parent c5b539dcd5
commit 01a7a3e146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -1100,6 +1100,7 @@ export namespace Completion {
"string",
"symbol",
"true",
"typeof",
"undefined",
"unique",
"unknown",

View File

@ -2318,6 +2318,7 @@ export const typeKeywords: readonly SyntaxKind[] = [
SyntaxKind.ReadonlyKeyword,
SyntaxKind.StringKeyword,
SyntaxKind.SymbolKeyword,
SyntaxKind.TypeOfKeyword,
SyntaxKind.TrueKeyword,
SyntaxKind.VoidKeyword,
SyntaxKind.UndefinedKeyword,

View File

@ -0,0 +1,8 @@
/// <reference path="fourslash.ts" />
////export type A = typ/**/
verify.completions({
marker: "",
includes: [{ name: "typeof", sortText: completion.SortText.GlobalsOrKeywords }]
});