mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Completions for asserts and declare (#36355)
* Add completions for `asserts` * Add declare assertions.
This commit is contained in:
committed by
GitHub
parent
5e59eece34
commit
c8e2f58ec5
@@ -902,7 +902,7 @@ namespace FourSlashInterface {
|
||||
export const keywords: readonly ExpectedCompletionEntryObject[] = keywordsWithUndefined.filter(k => k.name !== "undefined");
|
||||
|
||||
export const typeKeywords: readonly ExpectedCompletionEntryObject[] =
|
||||
["false", "null", "true", "void", "any", "boolean", "keyof", "never", "readonly", "number", "object", "string", "symbol", "undefined", "unique", "unknown", "bigint"].map(keywordEntry);
|
||||
["false", "null", "true", "void", "asserts", "any", "boolean", "keyof", "never", "readonly", "number", "object", "string", "symbol", "undefined", "unique", "unknown", "bigint"].map(keywordEntry);
|
||||
|
||||
const globalTypeDecls: readonly ExpectedCompletionEntryObject[] = [
|
||||
interfaceEntry("Symbol"),
|
||||
@@ -1058,7 +1058,7 @@ namespace FourSlashInterface {
|
||||
}
|
||||
|
||||
export const classElementKeywords: readonly ExpectedCompletionEntryObject[] =
|
||||
["private", "protected", "public", "static", "abstract", "async", "constructor", "get", "readonly", "set"].map(keywordEntry);
|
||||
["private", "protected", "public", "static", "abstract", "async", "constructor", "declare", "get", "readonly", "set"].map(keywordEntry);
|
||||
|
||||
export const classElementInJsKeywords = getInJsKeywords(classElementKeywords);
|
||||
|
||||
@@ -1152,6 +1152,7 @@ namespace FourSlashInterface {
|
||||
"let",
|
||||
"package",
|
||||
"yield",
|
||||
"asserts",
|
||||
"any",
|
||||
"async",
|
||||
"await",
|
||||
@@ -1351,6 +1352,7 @@ namespace FourSlashInterface {
|
||||
"let",
|
||||
"package",
|
||||
"yield",
|
||||
"asserts",
|
||||
"any",
|
||||
"async",
|
||||
"await",
|
||||
|
||||
@@ -2525,6 +2525,7 @@ namespace ts.Completions {
|
||||
case SyntaxKind.GetKeyword:
|
||||
case SyntaxKind.SetKeyword:
|
||||
case SyntaxKind.AsyncKeyword:
|
||||
case SyntaxKind.DeclareKeyword:
|
||||
return true;
|
||||
default:
|
||||
return isClassMemberModifier(kind);
|
||||
|
||||
@@ -1283,6 +1283,7 @@ namespace ts {
|
||||
|
||||
export const typeKeywords: readonly SyntaxKind[] = [
|
||||
SyntaxKind.AnyKeyword,
|
||||
SyntaxKind.AssertsKeyword,
|
||||
SyntaxKind.BigIntKeyword,
|
||||
SyntaxKind.BooleanKeyword,
|
||||
SyntaxKind.FalseKeyword,
|
||||
|
||||
Reference in New Issue
Block a user