Update LKG

This commit is contained in:
TypeScript Bot 2021-06-25 23:29:16 +00:00
parent dc237b317e
commit 353f431abf
25 changed files with 59957 additions and 45597 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

4872
lib/lib.dom.d.ts vendored

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@ and limitations under the License.
/////////////////////////////
/// DOM Iterable APIs
/// Window Iterable APIs
/////////////////////////////
interface AudioParam {
@ -50,10 +50,6 @@ interface CanvasPathDrawingStyles {
setLineDash(segments: Iterable<number>): void;
}
interface ClientRectList {
[Symbol.iterator](): IterableIterator<ClientRect>;
}
interface DOMRectList {
[Symbol.iterator](): IterableIterator<DOMRect>;
}
@ -77,6 +73,9 @@ interface FileList {
[Symbol.iterator](): IterableIterator<File>;
}
interface FontFaceSet extends Set<FontFace> {
}
interface FormData {
[Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
/**
@ -156,8 +155,13 @@ interface MediaList {
[Symbol.iterator](): IterableIterator<string>;
}
interface MessageEvent<T = any> {
/** @deprecated */
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
}
interface MimeTypeArray {
[Symbol.iterator](): IterableIterator<MimeType>;
[Symbol.iterator](): IterableIterator<any>;
}
interface NamedNodeMap {
@ -166,6 +170,7 @@ interface NamedNodeMap {
interface Navigator {
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
vibrate(pattern: Iterable<number>): boolean;
}
interface NodeList {
@ -201,20 +206,23 @@ interface NodeListOf<TNode extends Node> {
}
interface Plugin {
[Symbol.iterator](): IterableIterator<MimeType>;
[Symbol.iterator](): IterableIterator<undefined>;
}
interface PluginArray {
[Symbol.iterator](): IterableIterator<Plugin>;
}
interface RTCRtpTransceiver {
setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void;
[Symbol.iterator](): IterableIterator<any>;
}
interface RTCStatsReport extends ReadonlyMap<string, any> {
}
interface ReadableStream<R = any> {
[Symbol.iterator](): IterableIterator<any>;
entries(): IterableIterator<[number, any]>;
keys(): IterableIterator<number>;
values(): IterableIterator<any>;
}
interface SVGLengthList {
[Symbol.iterator](): IterableIterator<SVGLength>;
}
@ -231,12 +239,12 @@ interface SVGStringList {
[Symbol.iterator](): IterableIterator<string>;
}
interface SourceBufferList {
[Symbol.iterator](): IterableIterator<SourceBuffer>;
interface SVGTransformList {
[Symbol.iterator](): IterableIterator<SVGTransform>;
}
interface SpeechGrammarList {
[Symbol.iterator](): IterableIterator<SpeechGrammar>;
interface SourceBufferList {
[Symbol.iterator](): IterableIterator<SourceBuffer>;
}
interface SpeechRecognitionResult {
@ -251,6 +259,16 @@ interface StyleSheetList {
[Symbol.iterator](): IterableIterator<CSSStyleSheet>;
}
interface SubtleCrypto {
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
}
interface TextTrackCueList {
[Symbol.iterator](): IterableIterator<TextTrackCue>;
}
@ -279,10 +297,6 @@ interface URLSearchParams {
values(): IterableIterator<string>;
}
interface VRDisplay {
requestPresent(layers: Iterable<VRLayer>): Promise<void>;
}
interface WEBGL_draw_buffers {
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
}

File diff suppressed because it is too large Load diff

47
lib/protocol.d.ts vendored
View file

@ -72,7 +72,8 @@ declare namespace ts.server.protocol {
UncommentSelection = "uncommentSelection",
PrepareCallHierarchy = "prepareCallHierarchy",
ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls",
ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls"
ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls",
ProvideInlayHints = "provideInlayHints"
}
/**
* A TypeScript Server message
@ -1589,6 +1590,14 @@ declare namespace ts.server.protocol {
arguments: FormatOnKeyRequestArgs;
}
type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
const enum CompletionTriggerKind {
/** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */
Invoked = 1,
/** Completion was triggered by a trigger character. */
TriggerCharacter = 2,
/** Completion was re-triggered as the current completion list is incomplete. */
TriggerForIncompleteCompletions = 3
}
/**
* Arguments for completions messages.
*/
@ -1602,6 +1611,7 @@ declare namespace ts.server.protocol {
* Should be `undefined` if a user manually requested completion.
*/
triggerCharacter?: CompletionsTriggerCharacter;
triggerKind?: CompletionTriggerKind;
/**
* @deprecated Use UserPreferences.includeCompletionsForModuleExports
*/
@ -1944,6 +1954,35 @@ declare namespace ts.server.protocol {
interface SignatureHelpResponse extends Response {
body?: SignatureHelpItems;
}
const enum InlayHintKind {
Type = "Type",
Parameter = "Parameter",
Enum = "Enum"
}
interface InlayHintsRequestArgs extends FileRequestArgs {
/**
* Start position of the span.
*/
start: number;
/**
* Length of the span.
*/
length: number;
}
interface InlayHintsRequest extends Request {
command: CommandTypes.ProvideInlayHints;
arguments: InlayHintsRequestArgs;
}
interface InlayHintItem {
text: string;
position: Location;
kind?: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
interface InlayHintsResponse extends Response {
body?: InlayHintItem[];
}
/**
* Synchronous request for semantic diagnostics of one file.
*/
@ -2602,6 +2641,7 @@ declare namespace ts.server.protocol {
* values, with insertion text to replace preceding `.` tokens with `?.`.
*/
readonly includeAutomaticOptionalChainCompletions?: boolean;
readonly allowIncompleteCompletions?: boolean;
readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
@ -2832,7 +2872,10 @@ declare namespace ts.server.protocol {
* interface Y { foo:number; }
*/
memberVariableElement = "property",
/** class X { constructor() { } } */
/**
* class X { constructor() { } }
* class X { static { } }
*/
constructorImplementationElement = "constructor",
/** interface Y { ():number; } */
callSignatureElement = "call",

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

11926
lib/tsc.js

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -273,188 +273,189 @@ declare namespace ts {
PropertyDeclaration = 165,
MethodSignature = 166,
MethodDeclaration = 167,
Constructor = 168,
GetAccessor = 169,
SetAccessor = 170,
CallSignature = 171,
ConstructSignature = 172,
IndexSignature = 173,
TypePredicate = 174,
TypeReference = 175,
FunctionType = 176,
ConstructorType = 177,
TypeQuery = 178,
TypeLiteral = 179,
ArrayType = 180,
TupleType = 181,
OptionalType = 182,
RestType = 183,
UnionType = 184,
IntersectionType = 185,
ConditionalType = 186,
InferType = 187,
ParenthesizedType = 188,
ThisType = 189,
TypeOperator = 190,
IndexedAccessType = 191,
MappedType = 192,
LiteralType = 193,
NamedTupleMember = 194,
TemplateLiteralType = 195,
TemplateLiteralTypeSpan = 196,
ImportType = 197,
ObjectBindingPattern = 198,
ArrayBindingPattern = 199,
BindingElement = 200,
ArrayLiteralExpression = 201,
ObjectLiteralExpression = 202,
PropertyAccessExpression = 203,
ElementAccessExpression = 204,
CallExpression = 205,
NewExpression = 206,
TaggedTemplateExpression = 207,
TypeAssertionExpression = 208,
ParenthesizedExpression = 209,
FunctionExpression = 210,
ArrowFunction = 211,
DeleteExpression = 212,
TypeOfExpression = 213,
VoidExpression = 214,
AwaitExpression = 215,
PrefixUnaryExpression = 216,
PostfixUnaryExpression = 217,
BinaryExpression = 218,
ConditionalExpression = 219,
TemplateExpression = 220,
YieldExpression = 221,
SpreadElement = 222,
ClassExpression = 223,
OmittedExpression = 224,
ExpressionWithTypeArguments = 225,
AsExpression = 226,
NonNullExpression = 227,
MetaProperty = 228,
SyntheticExpression = 229,
TemplateSpan = 230,
SemicolonClassElement = 231,
Block = 232,
EmptyStatement = 233,
VariableStatement = 234,
ExpressionStatement = 235,
IfStatement = 236,
DoStatement = 237,
WhileStatement = 238,
ForStatement = 239,
ForInStatement = 240,
ForOfStatement = 241,
ContinueStatement = 242,
BreakStatement = 243,
ReturnStatement = 244,
WithStatement = 245,
SwitchStatement = 246,
LabeledStatement = 247,
ThrowStatement = 248,
TryStatement = 249,
DebuggerStatement = 250,
VariableDeclaration = 251,
VariableDeclarationList = 252,
FunctionDeclaration = 253,
ClassDeclaration = 254,
InterfaceDeclaration = 255,
TypeAliasDeclaration = 256,
EnumDeclaration = 257,
ModuleDeclaration = 258,
ModuleBlock = 259,
CaseBlock = 260,
NamespaceExportDeclaration = 261,
ImportEqualsDeclaration = 262,
ImportDeclaration = 263,
ImportClause = 264,
NamespaceImport = 265,
NamedImports = 266,
ImportSpecifier = 267,
ExportAssignment = 268,
ExportDeclaration = 269,
NamedExports = 270,
NamespaceExport = 271,
ExportSpecifier = 272,
MissingDeclaration = 273,
ExternalModuleReference = 274,
JsxElement = 275,
JsxSelfClosingElement = 276,
JsxOpeningElement = 277,
JsxClosingElement = 278,
JsxFragment = 279,
JsxOpeningFragment = 280,
JsxClosingFragment = 281,
JsxAttribute = 282,
JsxAttributes = 283,
JsxSpreadAttribute = 284,
JsxExpression = 285,
CaseClause = 286,
DefaultClause = 287,
HeritageClause = 288,
CatchClause = 289,
PropertyAssignment = 290,
ShorthandPropertyAssignment = 291,
SpreadAssignment = 292,
EnumMember = 293,
UnparsedPrologue = 294,
UnparsedPrepend = 295,
UnparsedText = 296,
UnparsedInternalText = 297,
UnparsedSyntheticReference = 298,
SourceFile = 299,
Bundle = 300,
UnparsedSource = 301,
InputFiles = 302,
JSDocTypeExpression = 303,
JSDocNameReference = 304,
JSDocMemberName = 305,
JSDocAllType = 306,
JSDocUnknownType = 307,
JSDocNullableType = 308,
JSDocNonNullableType = 309,
JSDocOptionalType = 310,
JSDocFunctionType = 311,
JSDocVariadicType = 312,
JSDocNamepathType = 313,
JSDocComment = 314,
JSDocText = 315,
JSDocTypeLiteral = 316,
JSDocSignature = 317,
JSDocLink = 318,
JSDocLinkCode = 319,
JSDocLinkPlain = 320,
JSDocTag = 321,
JSDocAugmentsTag = 322,
JSDocImplementsTag = 323,
JSDocAuthorTag = 324,
JSDocDeprecatedTag = 325,
JSDocClassTag = 326,
JSDocPublicTag = 327,
JSDocPrivateTag = 328,
JSDocProtectedTag = 329,
JSDocReadonlyTag = 330,
JSDocOverrideTag = 331,
JSDocCallbackTag = 332,
JSDocEnumTag = 333,
JSDocParameterTag = 334,
JSDocReturnTag = 335,
JSDocThisTag = 336,
JSDocTypeTag = 337,
JSDocTemplateTag = 338,
JSDocTypedefTag = 339,
JSDocSeeTag = 340,
JSDocPropertyTag = 341,
SyntaxList = 342,
NotEmittedStatement = 343,
PartiallyEmittedExpression = 344,
CommaListExpression = 345,
MergeDeclarationMarker = 346,
EndOfDeclarationMarker = 347,
SyntheticReferenceExpression = 348,
Count = 349,
ClassStaticBlockDeclaration = 168,
Constructor = 169,
GetAccessor = 170,
SetAccessor = 171,
CallSignature = 172,
ConstructSignature = 173,
IndexSignature = 174,
TypePredicate = 175,
TypeReference = 176,
FunctionType = 177,
ConstructorType = 178,
TypeQuery = 179,
TypeLiteral = 180,
ArrayType = 181,
TupleType = 182,
OptionalType = 183,
RestType = 184,
UnionType = 185,
IntersectionType = 186,
ConditionalType = 187,
InferType = 188,
ParenthesizedType = 189,
ThisType = 190,
TypeOperator = 191,
IndexedAccessType = 192,
MappedType = 193,
LiteralType = 194,
NamedTupleMember = 195,
TemplateLiteralType = 196,
TemplateLiteralTypeSpan = 197,
ImportType = 198,
ObjectBindingPattern = 199,
ArrayBindingPattern = 200,
BindingElement = 201,
ArrayLiteralExpression = 202,
ObjectLiteralExpression = 203,
PropertyAccessExpression = 204,
ElementAccessExpression = 205,
CallExpression = 206,
NewExpression = 207,
TaggedTemplateExpression = 208,
TypeAssertionExpression = 209,
ParenthesizedExpression = 210,
FunctionExpression = 211,
ArrowFunction = 212,
DeleteExpression = 213,
TypeOfExpression = 214,
VoidExpression = 215,
AwaitExpression = 216,
PrefixUnaryExpression = 217,
PostfixUnaryExpression = 218,
BinaryExpression = 219,
ConditionalExpression = 220,
TemplateExpression = 221,
YieldExpression = 222,
SpreadElement = 223,
ClassExpression = 224,
OmittedExpression = 225,
ExpressionWithTypeArguments = 226,
AsExpression = 227,
NonNullExpression = 228,
MetaProperty = 229,
SyntheticExpression = 230,
TemplateSpan = 231,
SemicolonClassElement = 232,
Block = 233,
EmptyStatement = 234,
VariableStatement = 235,
ExpressionStatement = 236,
IfStatement = 237,
DoStatement = 238,
WhileStatement = 239,
ForStatement = 240,
ForInStatement = 241,
ForOfStatement = 242,
ContinueStatement = 243,
BreakStatement = 244,
ReturnStatement = 245,
WithStatement = 246,
SwitchStatement = 247,
LabeledStatement = 248,
ThrowStatement = 249,
TryStatement = 250,
DebuggerStatement = 251,
VariableDeclaration = 252,
VariableDeclarationList = 253,
FunctionDeclaration = 254,
ClassDeclaration = 255,
InterfaceDeclaration = 256,
TypeAliasDeclaration = 257,
EnumDeclaration = 258,
ModuleDeclaration = 259,
ModuleBlock = 260,
CaseBlock = 261,
NamespaceExportDeclaration = 262,
ImportEqualsDeclaration = 263,
ImportDeclaration = 264,
ImportClause = 265,
NamespaceImport = 266,
NamedImports = 267,
ImportSpecifier = 268,
ExportAssignment = 269,
ExportDeclaration = 270,
NamedExports = 271,
NamespaceExport = 272,
ExportSpecifier = 273,
MissingDeclaration = 274,
ExternalModuleReference = 275,
JsxElement = 276,
JsxSelfClosingElement = 277,
JsxOpeningElement = 278,
JsxClosingElement = 279,
JsxFragment = 280,
JsxOpeningFragment = 281,
JsxClosingFragment = 282,
JsxAttribute = 283,
JsxAttributes = 284,
JsxSpreadAttribute = 285,
JsxExpression = 286,
CaseClause = 287,
DefaultClause = 288,
HeritageClause = 289,
CatchClause = 290,
PropertyAssignment = 291,
ShorthandPropertyAssignment = 292,
SpreadAssignment = 293,
EnumMember = 294,
UnparsedPrologue = 295,
UnparsedPrepend = 296,
UnparsedText = 297,
UnparsedInternalText = 298,
UnparsedSyntheticReference = 299,
SourceFile = 300,
Bundle = 301,
UnparsedSource = 302,
InputFiles = 303,
JSDocTypeExpression = 304,
JSDocNameReference = 305,
JSDocMemberName = 306,
JSDocAllType = 307,
JSDocUnknownType = 308,
JSDocNullableType = 309,
JSDocNonNullableType = 310,
JSDocOptionalType = 311,
JSDocFunctionType = 312,
JSDocVariadicType = 313,
JSDocNamepathType = 314,
JSDocComment = 315,
JSDocText = 316,
JSDocTypeLiteral = 317,
JSDocSignature = 318,
JSDocLink = 319,
JSDocLinkCode = 320,
JSDocLinkPlain = 321,
JSDocTag = 322,
JSDocAugmentsTag = 323,
JSDocImplementsTag = 324,
JSDocAuthorTag = 325,
JSDocDeprecatedTag = 326,
JSDocClassTag = 327,
JSDocPublicTag = 328,
JSDocPrivateTag = 329,
JSDocProtectedTag = 330,
JSDocReadonlyTag = 331,
JSDocOverrideTag = 332,
JSDocCallbackTag = 333,
JSDocEnumTag = 334,
JSDocParameterTag = 335,
JSDocReturnTag = 336,
JSDocThisTag = 337,
JSDocTypeTag = 338,
JSDocTemplateTag = 339,
JSDocTypedefTag = 340,
JSDocSeeTag = 341,
JSDocPropertyTag = 342,
SyntaxList = 343,
NotEmittedStatement = 344,
PartiallyEmittedExpression = 345,
CommaListExpression = 346,
MergeDeclarationMarker = 347,
EndOfDeclarationMarker = 348,
SyntheticReferenceExpression = 349,
Count = 350,
FirstAssignment = 63,
LastAssignment = 78,
FirstCompoundAssignment = 64,
@ -465,8 +466,8 @@ declare namespace ts {
LastKeyword = 158,
FirstFutureReservedWord = 117,
LastFutureReservedWord = 125,
FirstTypeNode = 174,
LastTypeNode = 197,
FirstTypeNode = 175,
LastTypeNode = 198,
FirstPunctuation = 18,
LastPunctuation = 78,
FirstToken = 0,
@ -479,13 +480,13 @@ declare namespace ts {
LastTemplateToken = 17,
FirstBinaryOperator = 29,
LastBinaryOperator = 78,
FirstStatement = 234,
LastStatement = 250,
FirstStatement = 235,
LastStatement = 251,
FirstNode = 159,
FirstJSDocNode = 303,
LastJSDocNode = 341,
FirstJSDocTagNode = 321,
LastJSDocTagNode = 341,
FirstJSDocNode = 304,
LastJSDocNode = 342,
FirstJSDocTagNode = 322,
LastJSDocTagNode = 342,
}
export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
@ -568,13 +569,13 @@ declare namespace ts {
}
export interface JSDocContainer {
}
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertySignature | PropertyDeclaration | PropertyAssignment | EnumMember;
export interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange {
hasTrailingComma?: boolean;
readonly hasTrailingComma: boolean;
}
export interface Token<TKind extends SyntaxKind> extends Node {
readonly kind: TKind;
@ -850,6 +851,11 @@ declare namespace ts {
readonly parent: ObjectTypeDeclaration;
readonly type: TypeNode;
}
export interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer {
readonly kind: SyntaxKind.ClassStaticBlockDeclaration;
readonly parent: ClassDeclaration | ClassExpression;
readonly body: Block;
}
export interface TypeNode extends Node {
_typeNodeBrand: any;
}
@ -2192,6 +2198,7 @@ declare namespace ts {
getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined;
getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
getIndexInfosOfType(type: Type): readonly IndexInfo[];
getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
getBaseTypes(type: InterfaceType): BaseType[];
@ -2208,7 +2215,7 @@ declare namespace ts {
typeArguments?: NodeArray<TypeNode>;
} | undefined;
/** Note that the resulting nodes cannot be checked. */
indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined;
indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined;
/** Note that the resulting nodes cannot be checked. */
symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined;
/** Note that the resulting nodes cannot be checked. */
@ -2606,8 +2613,7 @@ declare namespace ts {
declaredProperties: Symbol[];
declaredCallSignatures: Signature[];
declaredConstructSignatures: Signature[];
declaredStringIndexInfo?: IndexInfo;
declaredNumberIndexInfo?: IndexInfo;
declaredIndexInfos: IndexInfo[];
}
/**
* Type references (ObjectFlags.Reference). When a class or interface has type parameters or
@ -2721,6 +2727,7 @@ declare namespace ts {
Number = 1
}
export interface IndexInfo {
keyType: Type;
type: Type;
isReadonly: boolean;
declaration?: IndexSignatureDeclaration;
@ -2853,6 +2860,7 @@ declare namespace ts {
downlevelIteration?: boolean;
emitBOM?: boolean;
emitDecoratorMetadata?: boolean;
exactOptionalPropertyTypes?: boolean;
experimentalDecorators?: boolean;
forceConsistentCasingInFileNames?: boolean;
importHelpers?: boolean;
@ -2913,7 +2921,6 @@ declare namespace ts {
strictBindCallApply?: boolean;
strictNullChecks?: boolean;
strictPropertyInitialization?: boolean;
strictOptionalProperties?: boolean;
stripInternal?: boolean;
suppressExcessPropertyErrors?: boolean;
suppressImplicitAnyIndexErrors?: boolean;
@ -3291,6 +3298,8 @@ declare namespace ts {
updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration;
updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration;
createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>;
createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode;
updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode;
@ -3950,6 +3959,7 @@ declare namespace ts {
readonly includeCompletionsWithSnippetText?: boolean;
readonly includeAutomaticOptionalChainCompletions?: boolean;
readonly includeCompletionsWithInsertText?: boolean;
readonly allowIncompleteCompletions?: boolean;
readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
@ -3981,6 +3991,7 @@ declare namespace ts {
useCaseSensitiveFileNames: boolean;
write(s: string): void;
writeOutputIsTTY?(): boolean;
getWidthOfTerminal?(): number;
readFile(path: string, encoding?: string): string | undefined;
getFileSize?(path: string): number;
writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
@ -4453,6 +4464,7 @@ declare namespace ts {
function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
function isMethodSignature(node: Node): node is MethodSignature;
function isMethodDeclaration(node: Node): node is MethodDeclaration;
function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration;
function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
@ -5240,6 +5252,7 @@ declare namespace ts {
* writeFileCallback
*/
writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
getCustomTransformers?: (project: string) => CustomTransformers | undefined;
getModifiedTime(fileName: string): Date | undefined;
setModifiedTime(fileName: string, date: Date): void;
deleteFile(fileName: string): void;
@ -5512,6 +5525,11 @@ declare namespace ts {
PartialSemantic = 1,
Syntactic = 2
}
interface IncompleteCompletionsCache {
get(): CompletionInfo | undefined;
set(response: CompletionInfo): void;
clear(): void;
}
interface LanguageServiceHost extends GetEffectiveTypeRootsHost {
getCompilationSettings(): CompilerOptions;
getNewLine?(): string;
@ -5673,6 +5691,7 @@ declare namespace ts {
prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined;
provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[];
provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[];
provideInlayHints(fileName: string, span: TextSpan, preferences: UserPreferences | undefined): InlayHint[];
getOutliningSpans(fileName: string): OutliningSpan[];
getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[];
@ -5723,17 +5742,35 @@ declare namespace ts {
skipDestructiveCodeActions?: boolean;
}
type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
enum CompletionTriggerKind {
/** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */
Invoked = 1,
/** Completion was triggered by a trigger character. */
TriggerCharacter = 2,
/** Completion was re-triggered as the current completion list is incomplete. */
TriggerForIncompleteCompletions = 3
}
interface GetCompletionsAtPositionOptions extends UserPreferences {
/**
* If the editor is asking for completions because a certain character was typed
* (as opposed to when the user explicitly requested them) this should be set.
*/
triggerCharacter?: CompletionsTriggerCharacter;
triggerKind?: CompletionTriggerKind;
/** @deprecated Use includeCompletionsForModuleExports */
includeExternalModuleExports?: boolean;
/** @deprecated Use includeCompletionsWithInsertText */
includeInsertTextCompletions?: boolean;
}
interface InlayHintsOptions extends UserPreferences {
readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
readonly includeInlayFunctionParameterTypeHints?: boolean;
readonly includeInlayVariableTypeHints?: boolean;
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
}
type SignatureHelpTriggerCharacter = "," | "(" | "<";
type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
interface SignatureHelpItemsOptions {
@ -5839,6 +5876,18 @@ declare namespace ts {
to: CallHierarchyItem;
fromSpans: TextSpan[];
}
enum InlayHintKind {
Type = "Type",
Parameter = "Parameter",
Enum = "Enum"
}
interface InlayHint {
text: string;
position: number;
kind?: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
interface TodoCommentDescriptor {
text: string;
priority: number;
@ -6402,7 +6451,10 @@ declare namespace ts {
* interface Y { foo:number; }
*/
memberVariableElement = "property",
/** class X { constructor() { } } */
/**
* class X { constructor() { } }
* class X { static { } }
*/
constructorImplementationElement = "constructor",
/** interface Y { ():number; } */
callSignatureElement = "call",
@ -6504,6 +6556,14 @@ declare namespace ts {
jsxAttributeStringLiteralValue = 24,
bigintLiteral = 25
}
interface InlayHintsContext {
file: SourceFile;
program: Program;
cancellationToken: CancellationToken;
host: LanguageServiceHost;
span: TextSpan;
preferences: InlayHintsOptions;
}
}
declare namespace ts {
/** The classifier is used for syntactic highlighting in editors via the TSServer */
@ -6795,7 +6855,8 @@ declare namespace ts.server.protocol {
UncommentSelection = "uncommentSelection",
PrepareCallHierarchy = "prepareCallHierarchy",
ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls",
ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls"
ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls",
ProvideInlayHints = "provideInlayHints"
}
/**
* A TypeScript Server message
@ -8312,6 +8373,14 @@ declare namespace ts.server.protocol {
arguments: FormatOnKeyRequestArgs;
}
type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
enum CompletionTriggerKind {
/** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */
Invoked = 1,
/** Completion was triggered by a trigger character. */
TriggerCharacter = 2,
/** Completion was re-triggered as the current completion list is incomplete. */
TriggerForIncompleteCompletions = 3
}
/**
* Arguments for completions messages.
*/
@ -8325,6 +8394,7 @@ declare namespace ts.server.protocol {
* Should be `undefined` if a user manually requested completion.
*/
triggerCharacter?: CompletionsTriggerCharacter;
triggerKind?: CompletionTriggerKind;
/**
* @deprecated Use UserPreferences.includeCompletionsForModuleExports
*/
@ -8667,6 +8737,35 @@ declare namespace ts.server.protocol {
interface SignatureHelpResponse extends Response {
body?: SignatureHelpItems;
}
enum InlayHintKind {
Type = "Type",
Parameter = "Parameter",
Enum = "Enum"
}
interface InlayHintsRequestArgs extends FileRequestArgs {
/**
* Start position of the span.
*/
start: number;
/**
* Length of the span.
*/
length: number;
}
interface InlayHintsRequest extends Request {
command: CommandTypes.ProvideInlayHints;
arguments: InlayHintsRequestArgs;
}
interface InlayHintItem {
text: string;
position: Location;
kind?: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
interface InlayHintsResponse extends Response {
body?: InlayHintItem[];
}
/**
* Synchronous request for semantic diagnostics of one file.
*/
@ -9325,6 +9424,7 @@ declare namespace ts.server.protocol {
* values, with insertion text to replace preceding `.` tokens with `?.`.
*/
readonly includeAutomaticOptionalChainCompletions?: boolean;
readonly allowIncompleteCompletions?: boolean;
readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
@ -9556,6 +9656,7 @@ declare namespace ts.server {
languageService: LanguageService;
languageServiceHost: LanguageServiceHost;
serverHost: ServerHost;
session?: Session<unknown>;
config: any;
}
interface PluginModule {
@ -9947,13 +10048,14 @@ declare namespace ts.server {
/** @deprecated use serverMode instead */
syntaxOnly?: boolean;
serverMode?: LanguageServiceMode;
session: Session<unknown> | undefined;
}
export interface WatchOptionsAndErrors {
watchOptions: WatchOptions;
errors: Diagnostic[] | undefined;
}
export class ProjectService {
private readonly scriptInfoInNodeModulesWatchers;
private readonly nodeModulesWatchers;
/**
* Contains all the deleted script info's version information so that
* it does not reset when creating script info again
@ -10103,6 +10205,7 @@ declare namespace ts.server {
private createInferredProject;
getScriptInfo(uncheckedFileName: string): ScriptInfo | undefined;
private watchClosedScriptInfo;
private createNodeModulesWatcher;
private watchClosedScriptInfoInNodeModules;
private getModifiedTime;
private refreshScriptInfo;
@ -10294,6 +10397,7 @@ declare namespace ts.server {
private getSuggestionDiagnosticsSync;
private getJsxClosingTag;
private getDocumentHighlights;
private provideInlayHints;
private setCompilerOptionsForInferredProjects;
private getProjectInfo;
private getProjectInfoWorker;

File diff suppressed because it is too large Load diff

454
lib/typescript.d.ts vendored
View file

@ -273,188 +273,189 @@ declare namespace ts {
PropertyDeclaration = 165,
MethodSignature = 166,
MethodDeclaration = 167,
Constructor = 168,
GetAccessor = 169,
SetAccessor = 170,
CallSignature = 171,
ConstructSignature = 172,
IndexSignature = 173,
TypePredicate = 174,
TypeReference = 175,
FunctionType = 176,
ConstructorType = 177,
TypeQuery = 178,
TypeLiteral = 179,
ArrayType = 180,
TupleType = 181,
OptionalType = 182,
RestType = 183,
UnionType = 184,
IntersectionType = 185,
ConditionalType = 186,
InferType = 187,
ParenthesizedType = 188,
ThisType = 189,
TypeOperator = 190,
IndexedAccessType = 191,
MappedType = 192,
LiteralType = 193,
NamedTupleMember = 194,
TemplateLiteralType = 195,
TemplateLiteralTypeSpan = 196,
ImportType = 197,
ObjectBindingPattern = 198,
ArrayBindingPattern = 199,
BindingElement = 200,
ArrayLiteralExpression = 201,
ObjectLiteralExpression = 202,
PropertyAccessExpression = 203,
ElementAccessExpression = 204,
CallExpression = 205,
NewExpression = 206,
TaggedTemplateExpression = 207,
TypeAssertionExpression = 208,
ParenthesizedExpression = 209,
FunctionExpression = 210,
ArrowFunction = 211,
DeleteExpression = 212,
TypeOfExpression = 213,
VoidExpression = 214,
AwaitExpression = 215,
PrefixUnaryExpression = 216,
PostfixUnaryExpression = 217,
BinaryExpression = 218,
ConditionalExpression = 219,
TemplateExpression = 220,
YieldExpression = 221,
SpreadElement = 222,
ClassExpression = 223,
OmittedExpression = 224,
ExpressionWithTypeArguments = 225,
AsExpression = 226,
NonNullExpression = 227,
MetaProperty = 228,
SyntheticExpression = 229,
TemplateSpan = 230,
SemicolonClassElement = 231,
Block = 232,
EmptyStatement = 233,
VariableStatement = 234,
ExpressionStatement = 235,
IfStatement = 236,
DoStatement = 237,
WhileStatement = 238,
ForStatement = 239,
ForInStatement = 240,
ForOfStatement = 241,
ContinueStatement = 242,
BreakStatement = 243,
ReturnStatement = 244,
WithStatement = 245,
SwitchStatement = 246,
LabeledStatement = 247,
ThrowStatement = 248,
TryStatement = 249,
DebuggerStatement = 250,
VariableDeclaration = 251,
VariableDeclarationList = 252,
FunctionDeclaration = 253,
ClassDeclaration = 254,
InterfaceDeclaration = 255,
TypeAliasDeclaration = 256,
EnumDeclaration = 257,
ModuleDeclaration = 258,
ModuleBlock = 259,
CaseBlock = 260,
NamespaceExportDeclaration = 261,
ImportEqualsDeclaration = 262,
ImportDeclaration = 263,
ImportClause = 264,
NamespaceImport = 265,
NamedImports = 266,
ImportSpecifier = 267,
ExportAssignment = 268,
ExportDeclaration = 269,
NamedExports = 270,
NamespaceExport = 271,
ExportSpecifier = 272,
MissingDeclaration = 273,
ExternalModuleReference = 274,
JsxElement = 275,
JsxSelfClosingElement = 276,
JsxOpeningElement = 277,
JsxClosingElement = 278,
JsxFragment = 279,
JsxOpeningFragment = 280,
JsxClosingFragment = 281,
JsxAttribute = 282,
JsxAttributes = 283,
JsxSpreadAttribute = 284,
JsxExpression = 285,
CaseClause = 286,
DefaultClause = 287,
HeritageClause = 288,
CatchClause = 289,
PropertyAssignment = 290,
ShorthandPropertyAssignment = 291,
SpreadAssignment = 292,
EnumMember = 293,
UnparsedPrologue = 294,
UnparsedPrepend = 295,
UnparsedText = 296,
UnparsedInternalText = 297,
UnparsedSyntheticReference = 298,
SourceFile = 299,
Bundle = 300,
UnparsedSource = 301,
InputFiles = 302,
JSDocTypeExpression = 303,
JSDocNameReference = 304,
JSDocMemberName = 305,
JSDocAllType = 306,
JSDocUnknownType = 307,
JSDocNullableType = 308,
JSDocNonNullableType = 309,
JSDocOptionalType = 310,
JSDocFunctionType = 311,
JSDocVariadicType = 312,
JSDocNamepathType = 313,
JSDocComment = 314,
JSDocText = 315,
JSDocTypeLiteral = 316,
JSDocSignature = 317,
JSDocLink = 318,
JSDocLinkCode = 319,
JSDocLinkPlain = 320,
JSDocTag = 321,
JSDocAugmentsTag = 322,
JSDocImplementsTag = 323,
JSDocAuthorTag = 324,
JSDocDeprecatedTag = 325,
JSDocClassTag = 326,
JSDocPublicTag = 327,
JSDocPrivateTag = 328,
JSDocProtectedTag = 329,
JSDocReadonlyTag = 330,
JSDocOverrideTag = 331,
JSDocCallbackTag = 332,
JSDocEnumTag = 333,
JSDocParameterTag = 334,
JSDocReturnTag = 335,
JSDocThisTag = 336,
JSDocTypeTag = 337,
JSDocTemplateTag = 338,
JSDocTypedefTag = 339,
JSDocSeeTag = 340,
JSDocPropertyTag = 341,
SyntaxList = 342,
NotEmittedStatement = 343,
PartiallyEmittedExpression = 344,
CommaListExpression = 345,
MergeDeclarationMarker = 346,
EndOfDeclarationMarker = 347,
SyntheticReferenceExpression = 348,
Count = 349,
ClassStaticBlockDeclaration = 168,
Constructor = 169,
GetAccessor = 170,
SetAccessor = 171,
CallSignature = 172,
ConstructSignature = 173,
IndexSignature = 174,
TypePredicate = 175,
TypeReference = 176,
FunctionType = 177,
ConstructorType = 178,
TypeQuery = 179,
TypeLiteral = 180,
ArrayType = 181,
TupleType = 182,
OptionalType = 183,
RestType = 184,
UnionType = 185,
IntersectionType = 186,
ConditionalType = 187,
InferType = 188,
ParenthesizedType = 189,
ThisType = 190,
TypeOperator = 191,
IndexedAccessType = 192,
MappedType = 193,
LiteralType = 194,
NamedTupleMember = 195,
TemplateLiteralType = 196,
TemplateLiteralTypeSpan = 197,
ImportType = 198,
ObjectBindingPattern = 199,
ArrayBindingPattern = 200,
BindingElement = 201,
ArrayLiteralExpression = 202,
ObjectLiteralExpression = 203,
PropertyAccessExpression = 204,
ElementAccessExpression = 205,
CallExpression = 206,
NewExpression = 207,
TaggedTemplateExpression = 208,
TypeAssertionExpression = 209,
ParenthesizedExpression = 210,
FunctionExpression = 211,
ArrowFunction = 212,
DeleteExpression = 213,
TypeOfExpression = 214,
VoidExpression = 215,
AwaitExpression = 216,
PrefixUnaryExpression = 217,
PostfixUnaryExpression = 218,
BinaryExpression = 219,
ConditionalExpression = 220,
TemplateExpression = 221,
YieldExpression = 222,
SpreadElement = 223,
ClassExpression = 224,
OmittedExpression = 225,
ExpressionWithTypeArguments = 226,
AsExpression = 227,
NonNullExpression = 228,
MetaProperty = 229,
SyntheticExpression = 230,
TemplateSpan = 231,
SemicolonClassElement = 232,
Block = 233,
EmptyStatement = 234,
VariableStatement = 235,
ExpressionStatement = 236,
IfStatement = 237,
DoStatement = 238,
WhileStatement = 239,
ForStatement = 240,
ForInStatement = 241,
ForOfStatement = 242,
ContinueStatement = 243,
BreakStatement = 244,
ReturnStatement = 245,
WithStatement = 246,
SwitchStatement = 247,
LabeledStatement = 248,
ThrowStatement = 249,
TryStatement = 250,
DebuggerStatement = 251,
VariableDeclaration = 252,
VariableDeclarationList = 253,
FunctionDeclaration = 254,
ClassDeclaration = 255,
InterfaceDeclaration = 256,
TypeAliasDeclaration = 257,
EnumDeclaration = 258,
ModuleDeclaration = 259,
ModuleBlock = 260,
CaseBlock = 261,
NamespaceExportDeclaration = 262,
ImportEqualsDeclaration = 263,
ImportDeclaration = 264,
ImportClause = 265,
NamespaceImport = 266,
NamedImports = 267,
ImportSpecifier = 268,
ExportAssignment = 269,
ExportDeclaration = 270,
NamedExports = 271,
NamespaceExport = 272,
ExportSpecifier = 273,
MissingDeclaration = 274,
ExternalModuleReference = 275,
JsxElement = 276,
JsxSelfClosingElement = 277,
JsxOpeningElement = 278,
JsxClosingElement = 279,
JsxFragment = 280,
JsxOpeningFragment = 281,
JsxClosingFragment = 282,
JsxAttribute = 283,
JsxAttributes = 284,
JsxSpreadAttribute = 285,
JsxExpression = 286,
CaseClause = 287,
DefaultClause = 288,
HeritageClause = 289,
CatchClause = 290,
PropertyAssignment = 291,
ShorthandPropertyAssignment = 292,
SpreadAssignment = 293,
EnumMember = 294,
UnparsedPrologue = 295,
UnparsedPrepend = 296,
UnparsedText = 297,
UnparsedInternalText = 298,
UnparsedSyntheticReference = 299,
SourceFile = 300,
Bundle = 301,
UnparsedSource = 302,
InputFiles = 303,
JSDocTypeExpression = 304,
JSDocNameReference = 305,
JSDocMemberName = 306,
JSDocAllType = 307,
JSDocUnknownType = 308,
JSDocNullableType = 309,
JSDocNonNullableType = 310,
JSDocOptionalType = 311,
JSDocFunctionType = 312,
JSDocVariadicType = 313,
JSDocNamepathType = 314,
JSDocComment = 315,
JSDocText = 316,
JSDocTypeLiteral = 317,
JSDocSignature = 318,
JSDocLink = 319,
JSDocLinkCode = 320,
JSDocLinkPlain = 321,
JSDocTag = 322,
JSDocAugmentsTag = 323,
JSDocImplementsTag = 324,
JSDocAuthorTag = 325,
JSDocDeprecatedTag = 326,
JSDocClassTag = 327,
JSDocPublicTag = 328,
JSDocPrivateTag = 329,
JSDocProtectedTag = 330,
JSDocReadonlyTag = 331,
JSDocOverrideTag = 332,
JSDocCallbackTag = 333,
JSDocEnumTag = 334,
JSDocParameterTag = 335,
JSDocReturnTag = 336,
JSDocThisTag = 337,
JSDocTypeTag = 338,
JSDocTemplateTag = 339,
JSDocTypedefTag = 340,
JSDocSeeTag = 341,
JSDocPropertyTag = 342,
SyntaxList = 343,
NotEmittedStatement = 344,
PartiallyEmittedExpression = 345,
CommaListExpression = 346,
MergeDeclarationMarker = 347,
EndOfDeclarationMarker = 348,
SyntheticReferenceExpression = 349,
Count = 350,
FirstAssignment = 63,
LastAssignment = 78,
FirstCompoundAssignment = 64,
@ -465,8 +466,8 @@ declare namespace ts {
LastKeyword = 158,
FirstFutureReservedWord = 117,
LastFutureReservedWord = 125,
FirstTypeNode = 174,
LastTypeNode = 197,
FirstTypeNode = 175,
LastTypeNode = 198,
FirstPunctuation = 18,
LastPunctuation = 78,
FirstToken = 0,
@ -479,13 +480,13 @@ declare namespace ts {
LastTemplateToken = 17,
FirstBinaryOperator = 29,
LastBinaryOperator = 78,
FirstStatement = 234,
LastStatement = 250,
FirstStatement = 235,
LastStatement = 251,
FirstNode = 159,
FirstJSDocNode = 303,
LastJSDocNode = 341,
FirstJSDocTagNode = 321,
LastJSDocTagNode = 341,
FirstJSDocNode = 304,
LastJSDocNode = 342,
FirstJSDocTagNode = 322,
LastJSDocTagNode = 342,
}
export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
@ -568,13 +569,13 @@ declare namespace ts {
}
export interface JSDocContainer {
}
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertySignature | PropertyDeclaration | PropertyAssignment | EnumMember;
export interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange {
hasTrailingComma?: boolean;
readonly hasTrailingComma: boolean;
}
export interface Token<TKind extends SyntaxKind> extends Node {
readonly kind: TKind;
@ -850,6 +851,11 @@ declare namespace ts {
readonly parent: ObjectTypeDeclaration;
readonly type: TypeNode;
}
export interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer {
readonly kind: SyntaxKind.ClassStaticBlockDeclaration;
readonly parent: ClassDeclaration | ClassExpression;
readonly body: Block;
}
export interface TypeNode extends Node {
_typeNodeBrand: any;
}
@ -2192,6 +2198,7 @@ declare namespace ts {
getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined;
getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
getIndexInfosOfType(type: Type): readonly IndexInfo[];
getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
getBaseTypes(type: InterfaceType): BaseType[];
@ -2208,7 +2215,7 @@ declare namespace ts {
typeArguments?: NodeArray<TypeNode>;
} | undefined;
/** Note that the resulting nodes cannot be checked. */
indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined;
indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined;
/** Note that the resulting nodes cannot be checked. */
symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined;
/** Note that the resulting nodes cannot be checked. */
@ -2606,8 +2613,7 @@ declare namespace ts {
declaredProperties: Symbol[];
declaredCallSignatures: Signature[];
declaredConstructSignatures: Signature[];
declaredStringIndexInfo?: IndexInfo;
declaredNumberIndexInfo?: IndexInfo;
declaredIndexInfos: IndexInfo[];
}
/**
* Type references (ObjectFlags.Reference). When a class or interface has type parameters or
@ -2721,6 +2727,7 @@ declare namespace ts {
Number = 1
}
export interface IndexInfo {
keyType: Type;
type: Type;
isReadonly: boolean;
declaration?: IndexSignatureDeclaration;
@ -2853,6 +2860,7 @@ declare namespace ts {
downlevelIteration?: boolean;
emitBOM?: boolean;
emitDecoratorMetadata?: boolean;
exactOptionalPropertyTypes?: boolean;
experimentalDecorators?: boolean;
forceConsistentCasingInFileNames?: boolean;
importHelpers?: boolean;
@ -2913,7 +2921,6 @@ declare namespace ts {
strictBindCallApply?: boolean;
strictNullChecks?: boolean;
strictPropertyInitialization?: boolean;
strictOptionalProperties?: boolean;
stripInternal?: boolean;
suppressExcessPropertyErrors?: boolean;
suppressImplicitAnyIndexErrors?: boolean;
@ -3291,6 +3298,8 @@ declare namespace ts {
updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration;
updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration;
createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>;
createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode;
updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode;
@ -3950,6 +3959,7 @@ declare namespace ts {
readonly includeCompletionsWithSnippetText?: boolean;
readonly includeAutomaticOptionalChainCompletions?: boolean;
readonly includeCompletionsWithInsertText?: boolean;
readonly allowIncompleteCompletions?: boolean;
readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
@ -3981,6 +3991,7 @@ declare namespace ts {
useCaseSensitiveFileNames: boolean;
write(s: string): void;
writeOutputIsTTY?(): boolean;
getWidthOfTerminal?(): number;
readFile(path: string, encoding?: string): string | undefined;
getFileSize?(path: string): number;
writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
@ -4453,6 +4464,7 @@ declare namespace ts {
function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
function isMethodSignature(node: Node): node is MethodSignature;
function isMethodDeclaration(node: Node): node is MethodDeclaration;
function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration;
function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
@ -5240,6 +5252,7 @@ declare namespace ts {
* writeFileCallback
*/
writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
getCustomTransformers?: (project: string) => CustomTransformers | undefined;
getModifiedTime(fileName: string): Date | undefined;
setModifiedTime(fileName: string, date: Date): void;
deleteFile(fileName: string): void;
@ -5512,6 +5525,11 @@ declare namespace ts {
PartialSemantic = 1,
Syntactic = 2
}
interface IncompleteCompletionsCache {
get(): CompletionInfo | undefined;
set(response: CompletionInfo): void;
clear(): void;
}
interface LanguageServiceHost extends GetEffectiveTypeRootsHost {
getCompilationSettings(): CompilerOptions;
getNewLine?(): string;
@ -5673,6 +5691,7 @@ declare namespace ts {
prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined;
provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[];
provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[];
provideInlayHints(fileName: string, span: TextSpan, preferences: UserPreferences | undefined): InlayHint[];
getOutliningSpans(fileName: string): OutliningSpan[];
getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[];
@ -5723,17 +5742,35 @@ declare namespace ts {
skipDestructiveCodeActions?: boolean;
}
type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
enum CompletionTriggerKind {
/** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */
Invoked = 1,
/** Completion was triggered by a trigger character. */
TriggerCharacter = 2,
/** Completion was re-triggered as the current completion list is incomplete. */
TriggerForIncompleteCompletions = 3
}
interface GetCompletionsAtPositionOptions extends UserPreferences {
/**
* If the editor is asking for completions because a certain character was typed
* (as opposed to when the user explicitly requested them) this should be set.
*/
triggerCharacter?: CompletionsTriggerCharacter;
triggerKind?: CompletionTriggerKind;
/** @deprecated Use includeCompletionsForModuleExports */
includeExternalModuleExports?: boolean;
/** @deprecated Use includeCompletionsWithInsertText */
includeInsertTextCompletions?: boolean;
}
interface InlayHintsOptions extends UserPreferences {
readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
readonly includeInlayFunctionParameterTypeHints?: boolean;
readonly includeInlayVariableTypeHints?: boolean;
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
}
type SignatureHelpTriggerCharacter = "," | "(" | "<";
type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
interface SignatureHelpItemsOptions {
@ -5839,6 +5876,18 @@ declare namespace ts {
to: CallHierarchyItem;
fromSpans: TextSpan[];
}
enum InlayHintKind {
Type = "Type",
Parameter = "Parameter",
Enum = "Enum"
}
interface InlayHint {
text: string;
position: number;
kind?: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
interface TodoCommentDescriptor {
text: string;
priority: number;
@ -6402,7 +6451,10 @@ declare namespace ts {
* interface Y { foo:number; }
*/
memberVariableElement = "property",
/** class X { constructor() { } } */
/**
* class X { constructor() { } }
* class X { static { } }
*/
constructorImplementationElement = "constructor",
/** interface Y { ():number; } */
callSignatureElement = "call",
@ -6504,6 +6556,14 @@ declare namespace ts {
jsxAttributeStringLiteralValue = 24,
bigintLiteral = 25
}
interface InlayHintsContext {
file: SourceFile;
program: Program;
cancellationToken: CancellationToken;
host: LanguageServiceHost;
span: TextSpan;
preferences: InlayHintsOptions;
}
}
declare namespace ts {
/** The classifier is used for syntactic highlighting in editors via the TSServer */

File diff suppressed because it is too large Load diff

View file

@ -273,188 +273,189 @@ declare namespace ts {
PropertyDeclaration = 165,
MethodSignature = 166,
MethodDeclaration = 167,
Constructor = 168,
GetAccessor = 169,
SetAccessor = 170,
CallSignature = 171,
ConstructSignature = 172,
IndexSignature = 173,
TypePredicate = 174,
TypeReference = 175,
FunctionType = 176,
ConstructorType = 177,
TypeQuery = 178,
TypeLiteral = 179,
ArrayType = 180,
TupleType = 181,
OptionalType = 182,
RestType = 183,
UnionType = 184,
IntersectionType = 185,
ConditionalType = 186,
InferType = 187,
ParenthesizedType = 188,
ThisType = 189,
TypeOperator = 190,
IndexedAccessType = 191,
MappedType = 192,
LiteralType = 193,
NamedTupleMember = 194,
TemplateLiteralType = 195,
TemplateLiteralTypeSpan = 196,
ImportType = 197,
ObjectBindingPattern = 198,
ArrayBindingPattern = 199,
BindingElement = 200,
ArrayLiteralExpression = 201,
ObjectLiteralExpression = 202,
PropertyAccessExpression = 203,
ElementAccessExpression = 204,
CallExpression = 205,
NewExpression = 206,
TaggedTemplateExpression = 207,
TypeAssertionExpression = 208,
ParenthesizedExpression = 209,
FunctionExpression = 210,
ArrowFunction = 211,
DeleteExpression = 212,
TypeOfExpression = 213,
VoidExpression = 214,
AwaitExpression = 215,
PrefixUnaryExpression = 216,
PostfixUnaryExpression = 217,
BinaryExpression = 218,
ConditionalExpression = 219,
TemplateExpression = 220,
YieldExpression = 221,
SpreadElement = 222,
ClassExpression = 223,
OmittedExpression = 224,
ExpressionWithTypeArguments = 225,
AsExpression = 226,
NonNullExpression = 227,
MetaProperty = 228,
SyntheticExpression = 229,
TemplateSpan = 230,
SemicolonClassElement = 231,
Block = 232,
EmptyStatement = 233,
VariableStatement = 234,
ExpressionStatement = 235,
IfStatement = 236,
DoStatement = 237,
WhileStatement = 238,
ForStatement = 239,
ForInStatement = 240,
ForOfStatement = 241,
ContinueStatement = 242,
BreakStatement = 243,
ReturnStatement = 244,
WithStatement = 245,
SwitchStatement = 246,
LabeledStatement = 247,
ThrowStatement = 248,
TryStatement = 249,
DebuggerStatement = 250,
VariableDeclaration = 251,
VariableDeclarationList = 252,
FunctionDeclaration = 253,
ClassDeclaration = 254,
InterfaceDeclaration = 255,
TypeAliasDeclaration = 256,
EnumDeclaration = 257,
ModuleDeclaration = 258,
ModuleBlock = 259,
CaseBlock = 260,
NamespaceExportDeclaration = 261,
ImportEqualsDeclaration = 262,
ImportDeclaration = 263,
ImportClause = 264,
NamespaceImport = 265,
NamedImports = 266,
ImportSpecifier = 267,
ExportAssignment = 268,
ExportDeclaration = 269,
NamedExports = 270,
NamespaceExport = 271,
ExportSpecifier = 272,
MissingDeclaration = 273,
ExternalModuleReference = 274,
JsxElement = 275,
JsxSelfClosingElement = 276,
JsxOpeningElement = 277,
JsxClosingElement = 278,
JsxFragment = 279,
JsxOpeningFragment = 280,
JsxClosingFragment = 281,
JsxAttribute = 282,
JsxAttributes = 283,
JsxSpreadAttribute = 284,
JsxExpression = 285,
CaseClause = 286,
DefaultClause = 287,
HeritageClause = 288,
CatchClause = 289,
PropertyAssignment = 290,
ShorthandPropertyAssignment = 291,
SpreadAssignment = 292,
EnumMember = 293,
UnparsedPrologue = 294,
UnparsedPrepend = 295,
UnparsedText = 296,
UnparsedInternalText = 297,
UnparsedSyntheticReference = 298,
SourceFile = 299,
Bundle = 300,
UnparsedSource = 301,
InputFiles = 302,
JSDocTypeExpression = 303,
JSDocNameReference = 304,
JSDocMemberName = 305,
JSDocAllType = 306,
JSDocUnknownType = 307,
JSDocNullableType = 308,
JSDocNonNullableType = 309,
JSDocOptionalType = 310,
JSDocFunctionType = 311,
JSDocVariadicType = 312,
JSDocNamepathType = 313,
JSDocComment = 314,
JSDocText = 315,
JSDocTypeLiteral = 316,
JSDocSignature = 317,
JSDocLink = 318,
JSDocLinkCode = 319,
JSDocLinkPlain = 320,
JSDocTag = 321,
JSDocAugmentsTag = 322,
JSDocImplementsTag = 323,
JSDocAuthorTag = 324,
JSDocDeprecatedTag = 325,
JSDocClassTag = 326,
JSDocPublicTag = 327,
JSDocPrivateTag = 328,
JSDocProtectedTag = 329,
JSDocReadonlyTag = 330,
JSDocOverrideTag = 331,
JSDocCallbackTag = 332,
JSDocEnumTag = 333,
JSDocParameterTag = 334,
JSDocReturnTag = 335,
JSDocThisTag = 336,
JSDocTypeTag = 337,
JSDocTemplateTag = 338,
JSDocTypedefTag = 339,
JSDocSeeTag = 340,
JSDocPropertyTag = 341,
SyntaxList = 342,
NotEmittedStatement = 343,
PartiallyEmittedExpression = 344,
CommaListExpression = 345,
MergeDeclarationMarker = 346,
EndOfDeclarationMarker = 347,
SyntheticReferenceExpression = 348,
Count = 349,
ClassStaticBlockDeclaration = 168,
Constructor = 169,
GetAccessor = 170,
SetAccessor = 171,
CallSignature = 172,
ConstructSignature = 173,
IndexSignature = 174,
TypePredicate = 175,
TypeReference = 176,
FunctionType = 177,
ConstructorType = 178,
TypeQuery = 179,
TypeLiteral = 180,
ArrayType = 181,
TupleType = 182,
OptionalType = 183,
RestType = 184,
UnionType = 185,
IntersectionType = 186,
ConditionalType = 187,
InferType = 188,
ParenthesizedType = 189,
ThisType = 190,
TypeOperator = 191,
IndexedAccessType = 192,
MappedType = 193,
LiteralType = 194,
NamedTupleMember = 195,
TemplateLiteralType = 196,
TemplateLiteralTypeSpan = 197,
ImportType = 198,
ObjectBindingPattern = 199,
ArrayBindingPattern = 200,
BindingElement = 201,
ArrayLiteralExpression = 202,
ObjectLiteralExpression = 203,
PropertyAccessExpression = 204,
ElementAccessExpression = 205,
CallExpression = 206,
NewExpression = 207,
TaggedTemplateExpression = 208,
TypeAssertionExpression = 209,
ParenthesizedExpression = 210,
FunctionExpression = 211,
ArrowFunction = 212,
DeleteExpression = 213,
TypeOfExpression = 214,
VoidExpression = 215,
AwaitExpression = 216,
PrefixUnaryExpression = 217,
PostfixUnaryExpression = 218,
BinaryExpression = 219,
ConditionalExpression = 220,
TemplateExpression = 221,
YieldExpression = 222,
SpreadElement = 223,
ClassExpression = 224,
OmittedExpression = 225,
ExpressionWithTypeArguments = 226,
AsExpression = 227,
NonNullExpression = 228,
MetaProperty = 229,
SyntheticExpression = 230,
TemplateSpan = 231,
SemicolonClassElement = 232,
Block = 233,
EmptyStatement = 234,
VariableStatement = 235,
ExpressionStatement = 236,
IfStatement = 237,
DoStatement = 238,
WhileStatement = 239,
ForStatement = 240,
ForInStatement = 241,
ForOfStatement = 242,
ContinueStatement = 243,
BreakStatement = 244,
ReturnStatement = 245,
WithStatement = 246,
SwitchStatement = 247,
LabeledStatement = 248,
ThrowStatement = 249,
TryStatement = 250,
DebuggerStatement = 251,
VariableDeclaration = 252,
VariableDeclarationList = 253,
FunctionDeclaration = 254,
ClassDeclaration = 255,
InterfaceDeclaration = 256,
TypeAliasDeclaration = 257,
EnumDeclaration = 258,
ModuleDeclaration = 259,
ModuleBlock = 260,
CaseBlock = 261,
NamespaceExportDeclaration = 262,
ImportEqualsDeclaration = 263,
ImportDeclaration = 264,
ImportClause = 265,
NamespaceImport = 266,
NamedImports = 267,
ImportSpecifier = 268,
ExportAssignment = 269,
ExportDeclaration = 270,
NamedExports = 271,
NamespaceExport = 272,
ExportSpecifier = 273,
MissingDeclaration = 274,
ExternalModuleReference = 275,
JsxElement = 276,
JsxSelfClosingElement = 277,
JsxOpeningElement = 278,
JsxClosingElement = 279,
JsxFragment = 280,
JsxOpeningFragment = 281,
JsxClosingFragment = 282,
JsxAttribute = 283,
JsxAttributes = 284,
JsxSpreadAttribute = 285,
JsxExpression = 286,
CaseClause = 287,
DefaultClause = 288,
HeritageClause = 289,
CatchClause = 290,
PropertyAssignment = 291,
ShorthandPropertyAssignment = 292,
SpreadAssignment = 293,
EnumMember = 294,
UnparsedPrologue = 295,
UnparsedPrepend = 296,
UnparsedText = 297,
UnparsedInternalText = 298,
UnparsedSyntheticReference = 299,
SourceFile = 300,
Bundle = 301,
UnparsedSource = 302,
InputFiles = 303,
JSDocTypeExpression = 304,
JSDocNameReference = 305,
JSDocMemberName = 306,
JSDocAllType = 307,
JSDocUnknownType = 308,
JSDocNullableType = 309,
JSDocNonNullableType = 310,
JSDocOptionalType = 311,
JSDocFunctionType = 312,
JSDocVariadicType = 313,
JSDocNamepathType = 314,
JSDocComment = 315,
JSDocText = 316,
JSDocTypeLiteral = 317,
JSDocSignature = 318,
JSDocLink = 319,
JSDocLinkCode = 320,
JSDocLinkPlain = 321,
JSDocTag = 322,
JSDocAugmentsTag = 323,
JSDocImplementsTag = 324,
JSDocAuthorTag = 325,
JSDocDeprecatedTag = 326,
JSDocClassTag = 327,
JSDocPublicTag = 328,
JSDocPrivateTag = 329,
JSDocProtectedTag = 330,
JSDocReadonlyTag = 331,
JSDocOverrideTag = 332,
JSDocCallbackTag = 333,
JSDocEnumTag = 334,
JSDocParameterTag = 335,
JSDocReturnTag = 336,
JSDocThisTag = 337,
JSDocTypeTag = 338,
JSDocTemplateTag = 339,
JSDocTypedefTag = 340,
JSDocSeeTag = 341,
JSDocPropertyTag = 342,
SyntaxList = 343,
NotEmittedStatement = 344,
PartiallyEmittedExpression = 345,
CommaListExpression = 346,
MergeDeclarationMarker = 347,
EndOfDeclarationMarker = 348,
SyntheticReferenceExpression = 349,
Count = 350,
FirstAssignment = 63,
LastAssignment = 78,
FirstCompoundAssignment = 64,
@ -465,8 +466,8 @@ declare namespace ts {
LastKeyword = 158,
FirstFutureReservedWord = 117,
LastFutureReservedWord = 125,
FirstTypeNode = 174,
LastTypeNode = 197,
FirstTypeNode = 175,
LastTypeNode = 198,
FirstPunctuation = 18,
LastPunctuation = 78,
FirstToken = 0,
@ -479,13 +480,13 @@ declare namespace ts {
LastTemplateToken = 17,
FirstBinaryOperator = 29,
LastBinaryOperator = 78,
FirstStatement = 234,
LastStatement = 250,
FirstStatement = 235,
LastStatement = 251,
FirstNode = 159,
FirstJSDocNode = 303,
LastJSDocNode = 341,
FirstJSDocTagNode = 321,
LastJSDocTagNode = 341,
FirstJSDocNode = 304,
LastJSDocNode = 342,
FirstJSDocTagNode = 322,
LastJSDocTagNode = 342,
}
export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
@ -568,13 +569,13 @@ declare namespace ts {
}
export interface JSDocContainer {
}
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertySignature | PropertyDeclaration | PropertyAssignment | EnumMember;
export interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange {
hasTrailingComma?: boolean;
readonly hasTrailingComma: boolean;
}
export interface Token<TKind extends SyntaxKind> extends Node {
readonly kind: TKind;
@ -850,6 +851,11 @@ declare namespace ts {
readonly parent: ObjectTypeDeclaration;
readonly type: TypeNode;
}
export interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer {
readonly kind: SyntaxKind.ClassStaticBlockDeclaration;
readonly parent: ClassDeclaration | ClassExpression;
readonly body: Block;
}
export interface TypeNode extends Node {
_typeNodeBrand: any;
}
@ -2192,6 +2198,7 @@ declare namespace ts {
getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined;
getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
getIndexInfosOfType(type: Type): readonly IndexInfo[];
getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
getBaseTypes(type: InterfaceType): BaseType[];
@ -2208,7 +2215,7 @@ declare namespace ts {
typeArguments?: NodeArray<TypeNode>;
} | undefined;
/** Note that the resulting nodes cannot be checked. */
indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined;
indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined;
/** Note that the resulting nodes cannot be checked. */
symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined;
/** Note that the resulting nodes cannot be checked. */
@ -2606,8 +2613,7 @@ declare namespace ts {
declaredProperties: Symbol[];
declaredCallSignatures: Signature[];
declaredConstructSignatures: Signature[];
declaredStringIndexInfo?: IndexInfo;
declaredNumberIndexInfo?: IndexInfo;
declaredIndexInfos: IndexInfo[];
}
/**
* Type references (ObjectFlags.Reference). When a class or interface has type parameters or
@ -2721,6 +2727,7 @@ declare namespace ts {
Number = 1
}
export interface IndexInfo {
keyType: Type;
type: Type;
isReadonly: boolean;
declaration?: IndexSignatureDeclaration;
@ -2853,6 +2860,7 @@ declare namespace ts {
downlevelIteration?: boolean;
emitBOM?: boolean;
emitDecoratorMetadata?: boolean;
exactOptionalPropertyTypes?: boolean;
experimentalDecorators?: boolean;
forceConsistentCasingInFileNames?: boolean;
importHelpers?: boolean;
@ -2913,7 +2921,6 @@ declare namespace ts {
strictBindCallApply?: boolean;
strictNullChecks?: boolean;
strictPropertyInitialization?: boolean;
strictOptionalProperties?: boolean;
stripInternal?: boolean;
suppressExcessPropertyErrors?: boolean;
suppressImplicitAnyIndexErrors?: boolean;
@ -3291,6 +3298,8 @@ declare namespace ts {
updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration;
updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration;
createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>;
createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode;
updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode;
@ -3950,6 +3959,7 @@ declare namespace ts {
readonly includeCompletionsWithSnippetText?: boolean;
readonly includeAutomaticOptionalChainCompletions?: boolean;
readonly includeCompletionsWithInsertText?: boolean;
readonly allowIncompleteCompletions?: boolean;
readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
@ -3981,6 +3991,7 @@ declare namespace ts {
useCaseSensitiveFileNames: boolean;
write(s: string): void;
writeOutputIsTTY?(): boolean;
getWidthOfTerminal?(): number;
readFile(path: string, encoding?: string): string | undefined;
getFileSize?(path: string): number;
writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
@ -4453,6 +4464,7 @@ declare namespace ts {
function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
function isMethodSignature(node: Node): node is MethodSignature;
function isMethodDeclaration(node: Node): node is MethodDeclaration;
function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration;
function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
@ -5240,6 +5252,7 @@ declare namespace ts {
* writeFileCallback
*/
writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
getCustomTransformers?: (project: string) => CustomTransformers | undefined;
getModifiedTime(fileName: string): Date | undefined;
setModifiedTime(fileName: string, date: Date): void;
deleteFile(fileName: string): void;
@ -5512,6 +5525,11 @@ declare namespace ts {
PartialSemantic = 1,
Syntactic = 2
}
interface IncompleteCompletionsCache {
get(): CompletionInfo | undefined;
set(response: CompletionInfo): void;
clear(): void;
}
interface LanguageServiceHost extends GetEffectiveTypeRootsHost {
getCompilationSettings(): CompilerOptions;
getNewLine?(): string;
@ -5673,6 +5691,7 @@ declare namespace ts {
prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined;
provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[];
provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[];
provideInlayHints(fileName: string, span: TextSpan, preferences: UserPreferences | undefined): InlayHint[];
getOutliningSpans(fileName: string): OutliningSpan[];
getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[];
@ -5723,17 +5742,35 @@ declare namespace ts {
skipDestructiveCodeActions?: boolean;
}
type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
enum CompletionTriggerKind {
/** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */
Invoked = 1,
/** Completion was triggered by a trigger character. */
TriggerCharacter = 2,
/** Completion was re-triggered as the current completion list is incomplete. */
TriggerForIncompleteCompletions = 3
}
interface GetCompletionsAtPositionOptions extends UserPreferences {
/**
* If the editor is asking for completions because a certain character was typed
* (as opposed to when the user explicitly requested them) this should be set.
*/
triggerCharacter?: CompletionsTriggerCharacter;
triggerKind?: CompletionTriggerKind;
/** @deprecated Use includeCompletionsForModuleExports */
includeExternalModuleExports?: boolean;
/** @deprecated Use includeCompletionsWithInsertText */
includeInsertTextCompletions?: boolean;
}
interface InlayHintsOptions extends UserPreferences {
readonly includeInlayParameterNameHints?: "none" | "literals" | "all";
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
readonly includeInlayFunctionParameterTypeHints?: boolean;
readonly includeInlayVariableTypeHints?: boolean;
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
}
type SignatureHelpTriggerCharacter = "," | "(" | "<";
type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
interface SignatureHelpItemsOptions {
@ -5839,6 +5876,18 @@ declare namespace ts {
to: CallHierarchyItem;
fromSpans: TextSpan[];
}
enum InlayHintKind {
Type = "Type",
Parameter = "Parameter",
Enum = "Enum"
}
interface InlayHint {
text: string;
position: number;
kind?: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
interface TodoCommentDescriptor {
text: string;
priority: number;
@ -6402,7 +6451,10 @@ declare namespace ts {
* interface Y { foo:number; }
*/
memberVariableElement = "property",
/** class X { constructor() { } } */
/**
* class X { constructor() { } }
* class X { static { } }
*/
constructorImplementationElement = "constructor",
/** interface Y { ():number; } */
callSignatureElement = "call",
@ -6504,6 +6556,14 @@ declare namespace ts {
jsxAttributeStringLiteralValue = 24,
bigintLiteral = 25
}
interface InlayHintsContext {
file: SourceFile;
program: Program;
cancellationToken: CancellationToken;
host: LanguageServiceHost;
span: TextSpan;
preferences: InlayHintsOptions;
}
}
declare namespace ts {
/** The classifier is used for syntactic highlighting in editors via the TSServer */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff