@typescript-eslint/types 8.2.1-alpha.2 → 8.2.1-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,61 +17,61 @@ export declare interface AccessorPropertyNonComputedName extends PropertyDefinit
|
|
|
17
17
|
type: AST_NODE_TYPES.AccessorProperty;
|
|
18
18
|
}
|
|
19
19
|
export declare interface ArrayExpression extends BaseNode {
|
|
20
|
-
type: AST_NODE_TYPES.ArrayExpression;
|
|
21
20
|
/**
|
|
22
21
|
* an element will be `null` in the case of a sparse array: `[1, ,3]`
|
|
23
22
|
*/
|
|
24
23
|
elements: (Expression | SpreadElement | null)[];
|
|
24
|
+
type: AST_NODE_TYPES.ArrayExpression;
|
|
25
25
|
}
|
|
26
26
|
export declare interface ArrayPattern extends BaseNode {
|
|
27
|
-
|
|
27
|
+
decorators: Decorator[];
|
|
28
28
|
elements: (DestructuringPattern | null)[];
|
|
29
|
-
typeAnnotation: TSTypeAnnotation | undefined;
|
|
30
29
|
optional: boolean;
|
|
31
|
-
|
|
30
|
+
type: AST_NODE_TYPES.ArrayPattern;
|
|
31
|
+
typeAnnotation: TSTypeAnnotation | undefined;
|
|
32
32
|
}
|
|
33
33
|
export declare interface ArrowFunctionExpression extends BaseNode {
|
|
34
|
-
|
|
34
|
+
async: boolean;
|
|
35
|
+
body: BlockStatement | Expression;
|
|
36
|
+
expression: boolean;
|
|
35
37
|
generator: boolean;
|
|
36
38
|
id: null;
|
|
37
39
|
params: Parameter[];
|
|
38
|
-
body: BlockStatement | Expression;
|
|
39
|
-
async: boolean;
|
|
40
|
-
expression: boolean;
|
|
41
40
|
returnType: TSTypeAnnotation | undefined;
|
|
41
|
+
type: AST_NODE_TYPES.ArrowFunctionExpression;
|
|
42
42
|
typeParameters: TSTypeParameterDeclaration | undefined;
|
|
43
43
|
}
|
|
44
44
|
export declare interface AssignmentExpression extends BaseNode {
|
|
45
|
-
type: AST_NODE_TYPES.AssignmentExpression;
|
|
46
|
-
operator: ValueOf<AssignmentOperatorToText>;
|
|
47
45
|
left: Expression;
|
|
46
|
+
operator: ValueOf<AssignmentOperatorToText>;
|
|
48
47
|
right: Expression;
|
|
48
|
+
type: AST_NODE_TYPES.AssignmentExpression;
|
|
49
49
|
}
|
|
50
50
|
export declare interface AssignmentOperatorToText {
|
|
51
|
-
[SyntaxKind.
|
|
52
|
-
[SyntaxKind.
|
|
53
|
-
[SyntaxKind.MinusEqualsToken]: '-=';
|
|
54
|
-
[SyntaxKind.AsteriskEqualsToken]: '*=';
|
|
51
|
+
[SyntaxKind.AmpersandAmpersandEqualsToken]: '&&=';
|
|
52
|
+
[SyntaxKind.AmpersandEqualsToken]: '&=';
|
|
55
53
|
[SyntaxKind.AsteriskAsteriskEqualsToken]: '**=';
|
|
56
|
-
[SyntaxKind.
|
|
57
|
-
[SyntaxKind.
|
|
58
|
-
[SyntaxKind.
|
|
54
|
+
[SyntaxKind.AsteriskEqualsToken]: '*=';
|
|
55
|
+
[SyntaxKind.BarBarEqualsToken]: '||=';
|
|
56
|
+
[SyntaxKind.BarEqualsToken]: '|=';
|
|
57
|
+
[SyntaxKind.CaretEqualsToken]: '^=';
|
|
58
|
+
[SyntaxKind.EqualsToken]: '=';
|
|
59
59
|
[SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>=';
|
|
60
60
|
[SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>=';
|
|
61
|
-
[SyntaxKind.
|
|
62
|
-
[SyntaxKind.
|
|
63
|
-
[SyntaxKind.
|
|
64
|
-
[SyntaxKind.
|
|
61
|
+
[SyntaxKind.LessThanLessThanEqualsToken]: '<<=';
|
|
62
|
+
[SyntaxKind.MinusEqualsToken]: '-=';
|
|
63
|
+
[SyntaxKind.PercentEqualsToken]: '%=';
|
|
64
|
+
[SyntaxKind.PlusEqualsToken]: '+=';
|
|
65
65
|
[SyntaxKind.QuestionQuestionEqualsToken]: '??=';
|
|
66
|
-
[SyntaxKind.
|
|
66
|
+
[SyntaxKind.SlashEqualsToken]: '/=';
|
|
67
67
|
}
|
|
68
68
|
export declare interface AssignmentPattern extends BaseNode {
|
|
69
|
-
|
|
69
|
+
decorators: Decorator[];
|
|
70
70
|
left: BindingName;
|
|
71
|
+
optional: boolean;
|
|
71
72
|
right: Expression;
|
|
73
|
+
type: AST_NODE_TYPES.AssignmentPattern;
|
|
72
74
|
typeAnnotation: TSTypeAnnotation | undefined;
|
|
73
|
-
optional: boolean;
|
|
74
|
-
decorators: Decorator[];
|
|
75
75
|
}
|
|
76
76
|
export declare enum AST_NODE_TYPES {
|
|
77
77
|
AccessorProperty = "AccessorProperty",
|
|
@@ -181,19 +181,19 @@ export declare enum AST_NODE_TYPES {
|
|
|
181
181
|
TSDeclareFunction = "TSDeclareFunction",
|
|
182
182
|
TSDeclareKeyword = "TSDeclareKeyword",
|
|
183
183
|
TSEmptyBodyFunctionExpression = "TSEmptyBodyFunctionExpression",
|
|
184
|
-
TSEnumDeclaration = "TSEnumDeclaration",
|
|
185
184
|
TSEnumBody = "TSEnumBody",
|
|
185
|
+
TSEnumDeclaration = "TSEnumDeclaration",
|
|
186
186
|
TSEnumMember = "TSEnumMember",
|
|
187
187
|
TSExportAssignment = "TSExportAssignment",
|
|
188
188
|
TSExportKeyword = "TSExportKeyword",
|
|
189
189
|
TSExternalModuleReference = "TSExternalModuleReference",
|
|
190
190
|
TSFunctionType = "TSFunctionType",
|
|
191
|
-
TSInstantiationExpression = "TSInstantiationExpression",
|
|
192
191
|
TSImportEqualsDeclaration = "TSImportEqualsDeclaration",
|
|
193
192
|
TSImportType = "TSImportType",
|
|
194
193
|
TSIndexedAccessType = "TSIndexedAccessType",
|
|
195
194
|
TSIndexSignature = "TSIndexSignature",
|
|
196
195
|
TSInferType = "TSInferType",
|
|
196
|
+
TSInstantiationExpression = "TSInstantiationExpression",
|
|
197
197
|
TSInterfaceBody = "TSInterfaceBody",
|
|
198
198
|
TSInterfaceDeclaration = "TSInterfaceDeclaration",
|
|
199
199
|
TSInterfaceHeritage = "TSInterfaceHeritage",
|
|
@@ -259,8 +259,8 @@ export declare enum AST_TOKEN_TYPES {
|
|
|
259
259
|
Line = "Line"
|
|
260
260
|
}
|
|
261
261
|
export declare interface AwaitExpression extends BaseNode {
|
|
262
|
-
type: AST_NODE_TYPES.AwaitExpression;
|
|
263
262
|
argument: Expression;
|
|
263
|
+
type: AST_NODE_TYPES.AwaitExpression;
|
|
264
264
|
}
|
|
265
265
|
export declare interface BaseNode extends NodeOrTokenData {
|
|
266
266
|
type: AST_NODE_TYPES;
|
|
@@ -270,40 +270,40 @@ declare interface BaseToken extends NodeOrTokenData {
|
|
|
270
270
|
value: string;
|
|
271
271
|
}
|
|
272
272
|
export declare interface BigIntLiteral extends LiteralBase {
|
|
273
|
-
value: bigint | null;
|
|
274
273
|
bigint: string;
|
|
274
|
+
value: bigint | null;
|
|
275
275
|
}
|
|
276
276
|
export declare interface BinaryExpression extends BaseNode {
|
|
277
|
-
type: AST_NODE_TYPES.BinaryExpression;
|
|
278
|
-
operator: ValueOf<BinaryOperatorToText>;
|
|
279
277
|
left: Expression | PrivateIdentifier;
|
|
278
|
+
operator: ValueOf<BinaryOperatorToText>;
|
|
280
279
|
right: Expression;
|
|
280
|
+
type: AST_NODE_TYPES.BinaryExpression;
|
|
281
281
|
}
|
|
282
282
|
export declare interface BinaryOperatorToText {
|
|
283
|
-
[SyntaxKind.
|
|
284
|
-
[SyntaxKind.
|
|
283
|
+
[SyntaxKind.AmpersandAmpersandToken]: '&&';
|
|
284
|
+
[SyntaxKind.AmpersandToken]: '&';
|
|
285
285
|
[SyntaxKind.AsteriskAsteriskToken]: '**';
|
|
286
286
|
[SyntaxKind.AsteriskToken]: '*';
|
|
287
|
-
[SyntaxKind.
|
|
288
|
-
[SyntaxKind.PercentToken]: '%';
|
|
289
|
-
[SyntaxKind.PlusToken]: '+';
|
|
290
|
-
[SyntaxKind.MinusToken]: '-';
|
|
291
|
-
[SyntaxKind.AmpersandToken]: '&';
|
|
287
|
+
[SyntaxKind.BarBarToken]: '||';
|
|
292
288
|
[SyntaxKind.BarToken]: '|';
|
|
293
289
|
[SyntaxKind.CaretToken]: '^';
|
|
294
|
-
[SyntaxKind.LessThanLessThanToken]: '<<';
|
|
295
|
-
[SyntaxKind.GreaterThanGreaterThanToken]: '>>';
|
|
296
|
-
[SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>';
|
|
297
|
-
[SyntaxKind.AmpersandAmpersandToken]: '&&';
|
|
298
|
-
[SyntaxKind.BarBarToken]: '||';
|
|
299
|
-
[SyntaxKind.LessThanToken]: '<';
|
|
300
|
-
[SyntaxKind.LessThanEqualsToken]: '<=';
|
|
301
|
-
[SyntaxKind.GreaterThanToken]: '>';
|
|
302
|
-
[SyntaxKind.GreaterThanEqualsToken]: '>=';
|
|
303
|
-
[SyntaxKind.EqualsEqualsToken]: '==';
|
|
304
290
|
[SyntaxKind.EqualsEqualsEqualsToken]: '===';
|
|
291
|
+
[SyntaxKind.EqualsEqualsToken]: '==';
|
|
305
292
|
[SyntaxKind.ExclamationEqualsEqualsToken]: '!==';
|
|
306
293
|
[SyntaxKind.ExclamationEqualsToken]: '!=';
|
|
294
|
+
[SyntaxKind.GreaterThanEqualsToken]: '>=';
|
|
295
|
+
[SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>';
|
|
296
|
+
[SyntaxKind.GreaterThanGreaterThanToken]: '>>';
|
|
297
|
+
[SyntaxKind.GreaterThanToken]: '>';
|
|
298
|
+
[SyntaxKind.InKeyword]: 'in';
|
|
299
|
+
[SyntaxKind.InstanceOfKeyword]: 'instanceof';
|
|
300
|
+
[SyntaxKind.LessThanEqualsToken]: '<=';
|
|
301
|
+
[SyntaxKind.LessThanLessThanToken]: '<<';
|
|
302
|
+
[SyntaxKind.LessThanToken]: '<';
|
|
303
|
+
[SyntaxKind.MinusToken]: '-';
|
|
304
|
+
[SyntaxKind.PercentToken]: '%';
|
|
305
|
+
[SyntaxKind.PlusToken]: '+';
|
|
306
|
+
[SyntaxKind.SlashToken]: '/';
|
|
307
307
|
}
|
|
308
308
|
export declare type BindingName = BindingPattern | Identifier;
|
|
309
309
|
export declare type BindingPattern = ArrayPattern | ObjectPattern;
|
|
@@ -311,37 +311,37 @@ export declare interface BlockComment extends BaseToken {
|
|
|
311
311
|
type: AST_TOKEN_TYPES.Block;
|
|
312
312
|
}
|
|
313
313
|
export declare interface BlockStatement extends BaseNode {
|
|
314
|
-
type: AST_NODE_TYPES.BlockStatement;
|
|
315
314
|
body: Statement[];
|
|
315
|
+
type: AST_NODE_TYPES.BlockStatement;
|
|
316
316
|
}
|
|
317
317
|
export declare interface BooleanLiteral extends LiteralBase {
|
|
318
|
-
value: boolean;
|
|
319
318
|
raw: 'false' | 'true';
|
|
319
|
+
value: boolean;
|
|
320
320
|
}
|
|
321
321
|
export declare interface BooleanToken extends BaseToken {
|
|
322
322
|
type: AST_TOKEN_TYPES.Boolean;
|
|
323
323
|
}
|
|
324
324
|
export declare interface BreakStatement extends BaseNode {
|
|
325
|
-
type: AST_NODE_TYPES.BreakStatement;
|
|
326
325
|
label: Identifier | null;
|
|
326
|
+
type: AST_NODE_TYPES.BreakStatement;
|
|
327
327
|
}
|
|
328
328
|
export declare interface CallExpression extends BaseNode {
|
|
329
|
-
type: AST_NODE_TYPES.CallExpression;
|
|
330
|
-
callee: Expression;
|
|
331
329
|
arguments: CallExpressionArgument[];
|
|
332
|
-
|
|
330
|
+
callee: Expression;
|
|
333
331
|
optional: boolean;
|
|
332
|
+
type: AST_NODE_TYPES.CallExpression;
|
|
333
|
+
typeArguments: TSTypeParameterInstantiation | undefined;
|
|
334
334
|
}
|
|
335
335
|
export declare type CallExpressionArgument = Expression | SpreadElement;
|
|
336
336
|
export declare interface CatchClause extends BaseNode {
|
|
337
|
-
type: AST_NODE_TYPES.CatchClause;
|
|
338
|
-
param: BindingName | null;
|
|
339
337
|
body: BlockStatement;
|
|
338
|
+
param: BindingName | null;
|
|
339
|
+
type: AST_NODE_TYPES.CatchClause;
|
|
340
340
|
}
|
|
341
341
|
export declare type ChainElement = CallExpression | MemberExpression | TSNonNullExpression;
|
|
342
342
|
export declare interface ChainExpression extends BaseNode {
|
|
343
|
-
type: AST_NODE_TYPES.ChainExpression;
|
|
344
343
|
expression: ChainElement;
|
|
344
|
+
type: AST_NODE_TYPES.ChainExpression;
|
|
345
345
|
}
|
|
346
346
|
declare interface ClassBase extends BaseNode {
|
|
347
347
|
/**
|
|
@@ -398,8 +398,8 @@ declare interface ClassBase extends BaseNode {
|
|
|
398
398
|
typeParameters: TSTypeParameterDeclaration | undefined;
|
|
399
399
|
}
|
|
400
400
|
export declare interface ClassBody extends BaseNode {
|
|
401
|
-
type: AST_NODE_TYPES.ClassBody;
|
|
402
401
|
body: ClassElement[];
|
|
402
|
+
type: AST_NODE_TYPES.ClassBody;
|
|
403
403
|
}
|
|
404
404
|
export declare type ClassDeclaration = ClassDeclarationWithName | ClassDeclarationWithOptionalName;
|
|
405
405
|
declare interface ClassDeclarationBase extends ClassBase {
|
|
@@ -425,28 +425,27 @@ export declare interface ClassDeclarationWithOptionalName extends ClassDeclarati
|
|
|
425
425
|
}
|
|
426
426
|
export declare type ClassElement = AccessorProperty | MethodDefinition | PropertyDefinition | StaticBlock | TSAbstractAccessorProperty | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSIndexSignature;
|
|
427
427
|
export declare interface ClassExpression extends ClassBase {
|
|
428
|
-
type: AST_NODE_TYPES.ClassExpression;
|
|
429
428
|
abstract: false;
|
|
430
429
|
declare: false;
|
|
430
|
+
type: AST_NODE_TYPES.ClassExpression;
|
|
431
431
|
}
|
|
432
432
|
declare interface ClassMethodDefinitionNonComputedNameBase extends MethodDefinitionBase {
|
|
433
|
-
key: ClassPropertyNameNonComputed;
|
|
434
433
|
computed: false;
|
|
434
|
+
key: ClassPropertyNameNonComputed;
|
|
435
435
|
}
|
|
436
436
|
declare interface ClassPropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase {
|
|
437
|
-
key: ClassPropertyNameNonComputed;
|
|
438
437
|
computed: false;
|
|
438
|
+
key: ClassPropertyNameNonComputed;
|
|
439
439
|
}
|
|
440
440
|
export declare type ClassPropertyNameNonComputed = PrivateIdentifier | PropertyNameNonComputed;
|
|
441
441
|
export declare type Comment = BlockComment | LineComment;
|
|
442
442
|
export declare interface ConditionalExpression extends BaseNode {
|
|
443
|
-
type: AST_NODE_TYPES.ConditionalExpression;
|
|
444
|
-
test: Expression;
|
|
445
|
-
consequent: Expression;
|
|
446
443
|
alternate: Expression;
|
|
444
|
+
consequent: Expression;
|
|
445
|
+
test: Expression;
|
|
446
|
+
type: AST_NODE_TYPES.ConditionalExpression;
|
|
447
447
|
}
|
|
448
448
|
export declare interface ConstDeclaration extends LetOrConstOrVarDeclarationBase {
|
|
449
|
-
kind: 'const';
|
|
450
449
|
/**
|
|
451
450
|
* In a `declare const` declaration, the declarators may have initializers, but
|
|
452
451
|
* not definite assignment assertions. Each declarator cannot have both an
|
|
@@ -456,10 +455,11 @@ export declare interface ConstDeclaration extends LetOrConstOrVarDeclarationBase
|
|
|
456
455
|
* no initializer.
|
|
457
456
|
*/
|
|
458
457
|
declarations: VariableDeclaratorMaybeInit[];
|
|
458
|
+
kind: 'const';
|
|
459
459
|
}
|
|
460
460
|
export declare interface ContinueStatement extends BaseNode {
|
|
461
|
-
type: AST_NODE_TYPES.ContinueStatement;
|
|
462
461
|
label: Identifier | null;
|
|
462
|
+
type: AST_NODE_TYPES.ContinueStatement;
|
|
463
463
|
}
|
|
464
464
|
export declare interface DebuggerStatement extends BaseNode {
|
|
465
465
|
type: AST_NODE_TYPES.DebuggerStatement;
|
|
@@ -470,22 +470,21 @@ export declare interface DebuggerStatement extends BaseNode {
|
|
|
470
470
|
*/
|
|
471
471
|
export declare type DeclarationStatement = ClassDeclaration | ClassExpression | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | FunctionDeclaration | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration;
|
|
472
472
|
export declare interface Decorator extends BaseNode {
|
|
473
|
-
type: AST_NODE_TYPES.Decorator;
|
|
474
473
|
expression: LeftHandSideExpression;
|
|
474
|
+
type: AST_NODE_TYPES.Decorator;
|
|
475
475
|
}
|
|
476
476
|
export declare type DefaultExportDeclarations = ClassDeclarationWithOptionalName | Expression | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration;
|
|
477
477
|
export declare type DestructuringPattern = ArrayPattern | AssignmentPattern | Identifier | MemberExpression | ObjectPattern | RestElement;
|
|
478
478
|
export declare interface DoWhileStatement extends BaseNode {
|
|
479
|
-
type: AST_NODE_TYPES.DoWhileStatement;
|
|
480
|
-
test: Expression;
|
|
481
479
|
body: Statement;
|
|
480
|
+
test: Expression;
|
|
481
|
+
type: AST_NODE_TYPES.DoWhileStatement;
|
|
482
482
|
}
|
|
483
483
|
export declare interface EmptyStatement extends BaseNode {
|
|
484
484
|
type: AST_NODE_TYPES.EmptyStatement;
|
|
485
485
|
}
|
|
486
486
|
export declare type EntityName = Identifier | ThisExpression | TSQualifiedName;
|
|
487
487
|
export declare interface ExportAllDeclaration extends BaseNode {
|
|
488
|
-
type: AST_NODE_TYPES.ExportAllDeclaration;
|
|
489
488
|
/**
|
|
490
489
|
* The assertions declared for the export.
|
|
491
490
|
* @example
|
|
@@ -515,11 +514,11 @@ export declare interface ExportAllDeclaration extends BaseNode {
|
|
|
515
514
|
* The source module being exported from.
|
|
516
515
|
*/
|
|
517
516
|
source: StringLiteral;
|
|
517
|
+
type: AST_NODE_TYPES.ExportAllDeclaration;
|
|
518
518
|
}
|
|
519
519
|
declare type ExportAndImportKind = 'type' | 'value';
|
|
520
520
|
export declare type ExportDeclaration = DefaultExportDeclarations | NamedExportDeclarations;
|
|
521
521
|
export declare interface ExportDefaultDeclaration extends BaseNode {
|
|
522
|
-
type: AST_NODE_TYPES.ExportDefaultDeclaration;
|
|
523
522
|
/**
|
|
524
523
|
* The declaration being exported.
|
|
525
524
|
*/
|
|
@@ -528,11 +527,11 @@ export declare interface ExportDefaultDeclaration extends BaseNode {
|
|
|
528
527
|
* The kind of the export. Always `value` for default exports.
|
|
529
528
|
*/
|
|
530
529
|
exportKind: 'value';
|
|
530
|
+
type: AST_NODE_TYPES.ExportDefaultDeclaration;
|
|
531
531
|
}
|
|
532
532
|
declare type ExportKind = ExportAndImportKind;
|
|
533
533
|
export declare type ExportNamedDeclaration = ExportNamedDeclarationWithoutSourceWithMultiple | ExportNamedDeclarationWithoutSourceWithSingle | ExportNamedDeclarationWithSource;
|
|
534
534
|
declare interface ExportNamedDeclarationBase extends BaseNode {
|
|
535
|
-
type: AST_NODE_TYPES.ExportNamedDeclaration;
|
|
536
535
|
/**
|
|
537
536
|
* The assertions declared for the export.
|
|
538
537
|
* @example
|
|
@@ -578,6 +577,7 @@ declare interface ExportNamedDeclarationBase extends BaseNode {
|
|
|
578
577
|
* This will be an empty array if `declaration` is not `null`
|
|
579
578
|
*/
|
|
580
579
|
specifiers: ExportSpecifier[];
|
|
580
|
+
type: AST_NODE_TYPES.ExportNamedDeclaration;
|
|
581
581
|
}
|
|
582
582
|
/**
|
|
583
583
|
* Exporting names from the current module.
|
|
@@ -633,38 +633,38 @@ export declare interface ExportNamedDeclarationWithSource extends ExportNamedDec
|
|
|
633
633
|
source: StringLiteral;
|
|
634
634
|
}
|
|
635
635
|
export declare interface ExportSpecifier extends BaseNode {
|
|
636
|
-
type: AST_NODE_TYPES.ExportSpecifier;
|
|
637
|
-
local: Identifier;
|
|
638
636
|
exported: Identifier;
|
|
639
637
|
exportKind: ExportKind;
|
|
638
|
+
local: Identifier;
|
|
639
|
+
type: AST_NODE_TYPES.ExportSpecifier;
|
|
640
640
|
}
|
|
641
641
|
export declare type Expression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | ImportExpression | JSXElement | JSXFragment | LiteralExpression | LogicalExpression | MemberExpression | MetaProperty | NewExpression | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | TemplateLiteral | ThisExpression | TSAsExpression | TSInstantiationExpression | TSNonNullExpression | TSSatisfiesExpression | TSTypeAssertion | UnaryExpression | UpdateExpression | YieldExpression;
|
|
642
642
|
export declare interface ExpressionStatement extends BaseNode {
|
|
643
|
-
type: AST_NODE_TYPES.ExpressionStatement;
|
|
644
|
-
expression: Expression;
|
|
645
643
|
directive: string | undefined;
|
|
644
|
+
expression: Expression;
|
|
645
|
+
type: AST_NODE_TYPES.ExpressionStatement;
|
|
646
646
|
}
|
|
647
647
|
export declare type ForInitialiser = Expression | LetOrConstOrVarDeclaration;
|
|
648
648
|
export declare interface ForInStatement extends BaseNode {
|
|
649
|
-
|
|
649
|
+
body: Statement;
|
|
650
650
|
left: ForInitialiser;
|
|
651
651
|
right: Expression;
|
|
652
|
-
|
|
652
|
+
type: AST_NODE_TYPES.ForInStatement;
|
|
653
653
|
}
|
|
654
654
|
declare type ForOfInitialiser = Expression | LetOrConstOrVarDeclaration | UsingInForOfDeclaration;
|
|
655
655
|
export declare interface ForOfStatement extends BaseNode {
|
|
656
|
-
|
|
656
|
+
await: boolean;
|
|
657
|
+
body: Statement;
|
|
657
658
|
left: ForOfInitialiser;
|
|
658
659
|
right: Expression;
|
|
659
|
-
|
|
660
|
-
await: boolean;
|
|
660
|
+
type: AST_NODE_TYPES.ForOfStatement;
|
|
661
661
|
}
|
|
662
662
|
export declare interface ForStatement extends BaseNode {
|
|
663
|
-
|
|
663
|
+
body: Statement;
|
|
664
664
|
init: Expression | ForInitialiser | null;
|
|
665
665
|
test: Expression | null;
|
|
666
|
+
type: AST_NODE_TYPES.ForStatement;
|
|
666
667
|
update: Expression | null;
|
|
667
|
-
body: Statement;
|
|
668
668
|
}
|
|
669
669
|
declare interface FunctionBase extends BaseNode {
|
|
670
670
|
/**
|
|
@@ -731,10 +731,10 @@ declare interface FunctionBase extends BaseNode {
|
|
|
731
731
|
}
|
|
732
732
|
export declare type FunctionDeclaration = FunctionDeclarationWithName | FunctionDeclarationWithOptionalName;
|
|
733
733
|
declare interface FunctionDeclarationBase extends FunctionBase {
|
|
734
|
-
type: AST_NODE_TYPES.FunctionDeclaration;
|
|
735
734
|
body: BlockStatement;
|
|
736
735
|
declare: false;
|
|
737
736
|
expression: false;
|
|
737
|
+
type: AST_NODE_TYPES.FunctionDeclaration;
|
|
738
738
|
}
|
|
739
739
|
/**
|
|
740
740
|
* A normal function declaration:
|
|
@@ -755,35 +755,34 @@ export declare interface FunctionDeclarationWithOptionalName extends FunctionDec
|
|
|
755
755
|
id: Identifier | null;
|
|
756
756
|
}
|
|
757
757
|
export declare interface FunctionExpression extends FunctionBase {
|
|
758
|
-
type: AST_NODE_TYPES.FunctionExpression;
|
|
759
758
|
body: BlockStatement;
|
|
760
759
|
expression: false;
|
|
760
|
+
type: AST_NODE_TYPES.FunctionExpression;
|
|
761
761
|
}
|
|
762
762
|
export declare type FunctionLike = ArrowFunctionExpression | FunctionDeclaration | FunctionExpression | TSDeclareFunction | TSEmptyBodyFunctionExpression;
|
|
763
763
|
export declare interface Identifier extends BaseNode {
|
|
764
|
-
|
|
764
|
+
decorators: Decorator[];
|
|
765
765
|
name: string;
|
|
766
|
-
typeAnnotation: TSTypeAnnotation | undefined;
|
|
767
766
|
optional: boolean;
|
|
768
|
-
|
|
767
|
+
type: AST_NODE_TYPES.Identifier;
|
|
768
|
+
typeAnnotation: TSTypeAnnotation | undefined;
|
|
769
769
|
}
|
|
770
770
|
export declare interface IdentifierToken extends BaseToken {
|
|
771
771
|
type: AST_TOKEN_TYPES.Identifier;
|
|
772
772
|
}
|
|
773
773
|
export declare interface IfStatement extends BaseNode {
|
|
774
|
-
type: AST_NODE_TYPES.IfStatement;
|
|
775
|
-
test: Expression;
|
|
776
|
-
consequent: Statement;
|
|
777
774
|
alternate: Statement | null;
|
|
775
|
+
consequent: Statement;
|
|
776
|
+
test: Expression;
|
|
777
|
+
type: AST_NODE_TYPES.IfStatement;
|
|
778
778
|
}
|
|
779
779
|
export declare interface ImportAttribute extends BaseNode {
|
|
780
|
-
type: AST_NODE_TYPES.ImportAttribute;
|
|
781
780
|
key: Identifier | Literal;
|
|
781
|
+
type: AST_NODE_TYPES.ImportAttribute;
|
|
782
782
|
value: Literal;
|
|
783
783
|
}
|
|
784
784
|
export declare type ImportClause = ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier;
|
|
785
785
|
export declare interface ImportDeclaration extends BaseNode {
|
|
786
|
-
type: AST_NODE_TYPES.ImportDeclaration;
|
|
787
786
|
/**
|
|
788
787
|
* The assertions declared for the export.
|
|
789
788
|
* @example
|
|
@@ -821,101 +820,102 @@ export declare interface ImportDeclaration extends BaseNode {
|
|
|
821
820
|
* ```
|
|
822
821
|
*/
|
|
823
822
|
specifiers: ImportClause[];
|
|
823
|
+
type: AST_NODE_TYPES.ImportDeclaration;
|
|
824
824
|
}
|
|
825
825
|
export declare interface ImportDefaultSpecifier extends BaseNode {
|
|
826
|
-
type: AST_NODE_TYPES.ImportDefaultSpecifier;
|
|
827
826
|
local: Identifier;
|
|
827
|
+
type: AST_NODE_TYPES.ImportDefaultSpecifier;
|
|
828
828
|
}
|
|
829
829
|
export declare interface ImportExpression extends BaseNode {
|
|
830
|
-
type: AST_NODE_TYPES.ImportExpression;
|
|
831
|
-
source: Expression;
|
|
832
830
|
attributes: Expression | null;
|
|
831
|
+
source: Expression;
|
|
832
|
+
type: AST_NODE_TYPES.ImportExpression;
|
|
833
833
|
}
|
|
834
834
|
declare type ImportKind = ExportAndImportKind;
|
|
835
835
|
export declare interface ImportNamespaceSpecifier extends BaseNode {
|
|
836
|
-
type: AST_NODE_TYPES.ImportNamespaceSpecifier;
|
|
837
836
|
local: Identifier;
|
|
837
|
+
type: AST_NODE_TYPES.ImportNamespaceSpecifier;
|
|
838
838
|
}
|
|
839
839
|
export declare interface ImportSpecifier extends BaseNode {
|
|
840
|
-
type: AST_NODE_TYPES.ImportSpecifier;
|
|
841
|
-
local: Identifier;
|
|
842
840
|
imported: Identifier;
|
|
843
841
|
importKind: ImportKind;
|
|
842
|
+
local: Identifier;
|
|
843
|
+
type: AST_NODE_TYPES.ImportSpecifier;
|
|
844
844
|
}
|
|
845
845
|
export declare type IterationStatement = DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | WhileStatement;
|
|
846
846
|
export declare interface JSXAttribute extends BaseNode {
|
|
847
|
-
type: AST_NODE_TYPES.JSXAttribute;
|
|
848
847
|
name: JSXIdentifier | JSXNamespacedName;
|
|
848
|
+
type: AST_NODE_TYPES.JSXAttribute;
|
|
849
849
|
value: JSXElement | JSXExpression | Literal | null;
|
|
850
850
|
}
|
|
851
851
|
export declare type JSXChild = JSXElement | JSXExpression | JSXFragment | JSXText;
|
|
852
852
|
export declare interface JSXClosingElement extends BaseNode {
|
|
853
|
-
type: AST_NODE_TYPES.JSXClosingElement;
|
|
854
853
|
name: JSXTagNameExpression;
|
|
854
|
+
type: AST_NODE_TYPES.JSXClosingElement;
|
|
855
855
|
}
|
|
856
856
|
export declare interface JSXClosingFragment extends BaseNode {
|
|
857
857
|
type: AST_NODE_TYPES.JSXClosingFragment;
|
|
858
858
|
}
|
|
859
859
|
export declare interface JSXElement extends BaseNode {
|
|
860
|
-
type: AST_NODE_TYPES.JSXElement;
|
|
861
|
-
openingElement: JSXOpeningElement;
|
|
862
|
-
closingElement: JSXClosingElement | null;
|
|
863
860
|
children: JSXChild[];
|
|
861
|
+
closingElement: JSXClosingElement | null;
|
|
862
|
+
openingElement: JSXOpeningElement;
|
|
863
|
+
type: AST_NODE_TYPES.JSXElement;
|
|
864
864
|
}
|
|
865
865
|
export declare interface JSXEmptyExpression extends BaseNode {
|
|
866
866
|
type: AST_NODE_TYPES.JSXEmptyExpression;
|
|
867
867
|
}
|
|
868
868
|
export declare type JSXExpression = JSXExpressionContainer | JSXSpreadChild;
|
|
869
869
|
export declare interface JSXExpressionContainer extends BaseNode {
|
|
870
|
-
type: AST_NODE_TYPES.JSXExpressionContainer;
|
|
871
870
|
expression: Expression | JSXEmptyExpression;
|
|
871
|
+
type: AST_NODE_TYPES.JSXExpressionContainer;
|
|
872
872
|
}
|
|
873
873
|
export declare interface JSXFragment extends BaseNode {
|
|
874
|
-
type: AST_NODE_TYPES.JSXFragment;
|
|
875
|
-
openingFragment: JSXOpeningFragment;
|
|
876
|
-
closingFragment: JSXClosingFragment;
|
|
877
874
|
children: JSXChild[];
|
|
875
|
+
closingFragment: JSXClosingFragment;
|
|
876
|
+
openingFragment: JSXOpeningFragment;
|
|
877
|
+
type: AST_NODE_TYPES.JSXFragment;
|
|
878
878
|
}
|
|
879
879
|
export declare interface JSXIdentifier extends BaseNode {
|
|
880
|
-
type: AST_NODE_TYPES.JSXIdentifier;
|
|
881
880
|
name: string;
|
|
881
|
+
type: AST_NODE_TYPES.JSXIdentifier;
|
|
882
882
|
}
|
|
883
883
|
export declare interface JSXIdentifierToken extends BaseToken {
|
|
884
884
|
type: AST_TOKEN_TYPES.JSXIdentifier;
|
|
885
885
|
}
|
|
886
886
|
export declare interface JSXMemberExpression extends BaseNode {
|
|
887
|
-
type: AST_NODE_TYPES.JSXMemberExpression;
|
|
888
887
|
object: JSXTagNameExpression;
|
|
889
888
|
property: JSXIdentifier;
|
|
889
|
+
type: AST_NODE_TYPES.JSXMemberExpression;
|
|
890
890
|
}
|
|
891
891
|
export declare interface JSXNamespacedName extends BaseNode {
|
|
892
|
-
type: AST_NODE_TYPES.JSXNamespacedName;
|
|
893
|
-
namespace: JSXIdentifier;
|
|
894
892
|
name: JSXIdentifier;
|
|
893
|
+
namespace: JSXIdentifier;
|
|
894
|
+
type: AST_NODE_TYPES.JSXNamespacedName;
|
|
895
895
|
}
|
|
896
896
|
export declare interface JSXOpeningElement extends BaseNode {
|
|
897
|
+
attributes: (JSXAttribute | JSXSpreadAttribute)[];
|
|
898
|
+
name: JSXTagNameExpression;
|
|
899
|
+
selfClosing: boolean;
|
|
897
900
|
type: AST_NODE_TYPES.JSXOpeningElement;
|
|
898
901
|
typeArguments: TSTypeParameterInstantiation | undefined;
|
|
899
|
-
selfClosing: boolean;
|
|
900
|
-
name: JSXTagNameExpression;
|
|
901
|
-
attributes: (JSXAttribute | JSXSpreadAttribute)[];
|
|
902
902
|
}
|
|
903
903
|
export declare interface JSXOpeningFragment extends BaseNode {
|
|
904
904
|
type: AST_NODE_TYPES.JSXOpeningFragment;
|
|
905
905
|
}
|
|
906
906
|
export declare interface JSXSpreadAttribute extends BaseNode {
|
|
907
|
-
type: AST_NODE_TYPES.JSXSpreadAttribute;
|
|
908
907
|
argument: Expression;
|
|
908
|
+
type: AST_NODE_TYPES.JSXSpreadAttribute;
|
|
909
909
|
}
|
|
910
910
|
export declare interface JSXSpreadChild extends BaseNode {
|
|
911
|
-
type: AST_NODE_TYPES.JSXSpreadChild;
|
|
912
911
|
expression: Expression | JSXEmptyExpression;
|
|
912
|
+
type: AST_NODE_TYPES.JSXSpreadChild;
|
|
913
913
|
}
|
|
914
914
|
export declare type JSXTagNameExpression = JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
|
|
915
915
|
export declare interface JSXText extends BaseNode {
|
|
916
|
+
raw: string;
|
|
916
917
|
type: AST_NODE_TYPES.JSXText;
|
|
917
918
|
value: string;
|
|
918
|
-
raw: string;
|
|
919
919
|
}
|
|
920
920
|
export declare interface JSXTextToken extends BaseToken {
|
|
921
921
|
type: AST_TOKEN_TYPES.JSXText;
|
|
@@ -924,14 +924,13 @@ export declare interface KeywordToken extends BaseToken {
|
|
|
924
924
|
type: AST_TOKEN_TYPES.Keyword;
|
|
925
925
|
}
|
|
926
926
|
export declare interface LabeledStatement extends BaseNode {
|
|
927
|
-
type: AST_NODE_TYPES.LabeledStatement;
|
|
928
|
-
label: Identifier;
|
|
929
927
|
body: Statement;
|
|
928
|
+
label: Identifier;
|
|
929
|
+
type: AST_NODE_TYPES.LabeledStatement;
|
|
930
930
|
}
|
|
931
931
|
export declare type LeftHandSideExpression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | CallExpression | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | LiteralExpression | MemberExpression | MetaProperty | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression | TSAsExpression | TSNonNullExpression | TSTypeAssertion;
|
|
932
932
|
export declare type LetOrConstOrVarDeclaration = ConstDeclaration | LetOrVarDeclaredDeclaration | LetOrVarNonDeclaredDeclaration;
|
|
933
933
|
declare interface LetOrConstOrVarDeclarationBase extends BaseNode {
|
|
934
|
-
type: AST_NODE_TYPES.VariableDeclaration;
|
|
935
934
|
/**
|
|
936
935
|
* The variables declared by this declaration.
|
|
937
936
|
* Always non-empty.
|
|
@@ -960,11 +959,10 @@ declare interface LetOrConstOrVarDeclarationBase extends BaseNode {
|
|
|
960
959
|
* ```
|
|
961
960
|
*/
|
|
962
961
|
kind: 'const' | 'let' | 'var';
|
|
962
|
+
type: AST_NODE_TYPES.VariableDeclaration;
|
|
963
963
|
}
|
|
964
964
|
export declare type LetOrConstOrVarDeclarator = VariableDeclaratorDefiniteAssignment | VariableDeclaratorMaybeInit | VariableDeclaratorNoInit;
|
|
965
965
|
export declare interface LetOrVarDeclaredDeclaration extends LetOrConstOrVarDeclarationBase {
|
|
966
|
-
kind: 'let' | 'var';
|
|
967
|
-
declare: true;
|
|
968
966
|
/**
|
|
969
967
|
* In a `declare let` declaration, the declarators must not have definite assignment
|
|
970
968
|
* assertions or initializers.
|
|
@@ -976,86 +974,88 @@ export declare interface LetOrVarDeclaredDeclaration extends LetOrConstOrVarDecl
|
|
|
976
974
|
* ```
|
|
977
975
|
*/
|
|
978
976
|
declarations: VariableDeclaratorNoInit[];
|
|
977
|
+
declare: true;
|
|
978
|
+
kind: 'let' | 'var';
|
|
979
979
|
}
|
|
980
980
|
export declare interface LetOrVarNonDeclaredDeclaration extends LetOrConstOrVarDeclarationBase {
|
|
981
|
-
kind: 'let' | 'var';
|
|
982
|
-
declare: false;
|
|
983
981
|
/**
|
|
984
982
|
* In a `let`/`var` declaration, the declarators may have definite assignment
|
|
985
983
|
* assertions or initializers, but not both.
|
|
986
984
|
*/
|
|
987
985
|
declarations: (VariableDeclaratorDefiniteAssignment | VariableDeclaratorMaybeInit)[];
|
|
986
|
+
declare: false;
|
|
987
|
+
kind: 'let' | 'var';
|
|
988
988
|
}
|
|
989
989
|
export declare interface LineComment extends BaseToken {
|
|
990
990
|
type: AST_TOKEN_TYPES.Line;
|
|
991
991
|
}
|
|
992
992
|
export declare type Literal = BigIntLiteral | BooleanLiteral | NullLiteral | NumberLiteral | RegExpLiteral | StringLiteral;
|
|
993
993
|
declare interface LiteralBase extends BaseNode {
|
|
994
|
-
type: AST_NODE_TYPES.Literal;
|
|
995
994
|
raw: string;
|
|
995
|
+
type: AST_NODE_TYPES.Literal;
|
|
996
996
|
value: RegExp | bigint | boolean | number | string | null;
|
|
997
997
|
}
|
|
998
998
|
export declare type LiteralExpression = Literal | TemplateLiteral;
|
|
999
999
|
export declare interface LogicalExpression extends BaseNode {
|
|
1000
|
-
type: AST_NODE_TYPES.LogicalExpression;
|
|
1001
|
-
operator: '??' | '&&' | '||';
|
|
1002
1000
|
left: Expression;
|
|
1001
|
+
operator: '&&' | '??' | '||';
|
|
1003
1002
|
right: Expression;
|
|
1003
|
+
type: AST_NODE_TYPES.LogicalExpression;
|
|
1004
1004
|
}
|
|
1005
1005
|
export declare type MemberExpression = MemberExpressionComputedName | MemberExpressionNonComputedName;
|
|
1006
1006
|
declare interface MemberExpressionBase extends BaseNode {
|
|
1007
|
+
computed: boolean;
|
|
1007
1008
|
object: Expression;
|
|
1009
|
+
optional: boolean;
|
|
1008
1010
|
property: Expression | Identifier | PrivateIdentifier;
|
|
1009
|
-
computed: boolean;
|
|
1010
|
-
optional: boolean;
|
|
1011
1011
|
}
|
|
1012
1012
|
export declare interface MemberExpressionComputedName extends MemberExpressionBase {
|
|
1013
|
-
type: AST_NODE_TYPES.MemberExpression;
|
|
1014
|
-
property: Expression;
|
|
1015
1013
|
computed: true;
|
|
1014
|
+
property: Expression;
|
|
1015
|
+
type: AST_NODE_TYPES.MemberExpression;
|
|
1016
1016
|
}
|
|
1017
1017
|
export declare interface MemberExpressionNonComputedName extends MemberExpressionBase {
|
|
1018
|
-
type: AST_NODE_TYPES.MemberExpression;
|
|
1019
|
-
property: Identifier | PrivateIdentifier;
|
|
1020
1018
|
computed: false;
|
|
1019
|
+
property: Identifier | PrivateIdentifier;
|
|
1020
|
+
type: AST_NODE_TYPES.MemberExpression;
|
|
1021
1021
|
}
|
|
1022
1022
|
export declare interface MetaProperty extends BaseNode {
|
|
1023
|
-
type: AST_NODE_TYPES.MetaProperty;
|
|
1024
1023
|
meta: Identifier;
|
|
1025
1024
|
property: Identifier;
|
|
1025
|
+
type: AST_NODE_TYPES.MetaProperty;
|
|
1026
1026
|
}
|
|
1027
1027
|
export declare type MethodDefinition = MethodDefinitionComputedName | MethodDefinitionNonComputedName;
|
|
1028
1028
|
/** this should not be directly used - instead use MethodDefinitionComputedNameBase or MethodDefinitionNonComputedNameBase */
|
|
1029
1029
|
declare interface MethodDefinitionBase extends BaseNode {
|
|
1030
|
-
|
|
1031
|
-
value: FunctionExpression | TSEmptyBodyFunctionExpression;
|
|
1030
|
+
accessibility: Accessibility | undefined;
|
|
1032
1031
|
computed: boolean;
|
|
1033
|
-
|
|
1032
|
+
decorators: Decorator[];
|
|
1033
|
+
key: PropertyName;
|
|
1034
1034
|
kind: 'constructor' | 'get' | 'method' | 'set';
|
|
1035
1035
|
optional: boolean;
|
|
1036
|
-
decorators: Decorator[];
|
|
1037
|
-
accessibility: Accessibility | undefined;
|
|
1038
1036
|
override: boolean;
|
|
1037
|
+
static: boolean;
|
|
1038
|
+
value: FunctionExpression | TSEmptyBodyFunctionExpression;
|
|
1039
1039
|
}
|
|
1040
1040
|
export declare interface MethodDefinitionComputedName extends MethodDefinitionComputedNameBase {
|
|
1041
1041
|
type: AST_NODE_TYPES.MethodDefinition;
|
|
1042
1042
|
}
|
|
1043
1043
|
declare interface MethodDefinitionComputedNameBase extends MethodDefinitionBase {
|
|
1044
|
-
key: PropertyNameComputed;
|
|
1045
1044
|
computed: true;
|
|
1045
|
+
key: PropertyNameComputed;
|
|
1046
1046
|
}
|
|
1047
1047
|
export declare interface MethodDefinitionNonComputedName extends ClassMethodDefinitionNonComputedNameBase {
|
|
1048
1048
|
type: AST_NODE_TYPES.MethodDefinition;
|
|
1049
1049
|
}
|
|
1050
1050
|
declare interface MethodDefinitionNonComputedNameBase extends MethodDefinitionBase {
|
|
1051
|
-
key: PropertyNameNonComputed;
|
|
1052
1051
|
computed: false;
|
|
1052
|
+
key: PropertyNameNonComputed;
|
|
1053
1053
|
}
|
|
1054
1054
|
export declare type NamedExportDeclarations = ClassDeclarationWithName | ClassDeclarationWithOptionalName | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration;
|
|
1055
1055
|
export declare interface NewExpression extends BaseNode {
|
|
1056
|
-
type: AST_NODE_TYPES.NewExpression;
|
|
1057
|
-
callee: Expression;
|
|
1058
1056
|
arguments: CallExpressionArgument[];
|
|
1057
|
+
callee: Expression;
|
|
1058
|
+
type: AST_NODE_TYPES.NewExpression;
|
|
1059
1059
|
typeArguments: TSTypeParameterInstantiation | undefined;
|
|
1060
1060
|
}
|
|
1061
1061
|
export declare type Node = AccessorProperty | ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BlockStatement | BreakStatement | CallExpression | CatchClause | ChainExpression | ClassBody | ClassDeclaration | ClassExpression | ConditionalExpression | ContinueStatement | DebuggerStatement | Decorator | DoWhileStatement | EmptyStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportExpression | ImportNamespaceSpecifier | ImportSpecifier | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LabeledStatement | Literal | LogicalExpression | MemberExpression | MetaProperty | MethodDefinition | NewExpression | ObjectExpression | ObjectPattern | PrivateIdentifier | Program | Property | PropertyDefinition | RestElement | ReturnStatement | SequenceExpression | SpreadElement | StaticBlock | Super | SwitchCase | SwitchStatement | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThrowStatement | TryStatement | TSAbstractAccessorProperty | TSAbstractKeyword | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSAnyKeyword | TSArrayType | TSAsExpression | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSClassImplements | TSConditionalType | TSConstructorType | TSConstructSignatureDeclaration | TSDeclareFunction | TSDeclareKeyword | TSEmptyBodyFunctionExpression | TSEnumBody | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExportKeyword | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexedAccessType | TSIndexSignature | TSInferType | TSInstantiationExpression | TSInterfaceBody | TSInterfaceDeclaration | TSInterfaceHeritage | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSPrivateKeyword | TSPropertySignature | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSSatisfiesExpression | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | YieldExpression;
|
|
@@ -1070,8 +1070,8 @@ export declare interface NodeOrTokenData {
|
|
|
1070
1070
|
type: string;
|
|
1071
1071
|
}
|
|
1072
1072
|
export declare interface NullLiteral extends LiteralBase {
|
|
1073
|
-
value: null;
|
|
1074
1073
|
raw: 'null';
|
|
1074
|
+
value: null;
|
|
1075
1075
|
}
|
|
1076
1076
|
export declare interface NullToken extends BaseToken {
|
|
1077
1077
|
type: AST_TOKEN_TYPES.Null;
|
|
@@ -1083,147 +1083,147 @@ export declare interface NumericToken extends BaseToken {
|
|
|
1083
1083
|
type: AST_TOKEN_TYPES.Numeric;
|
|
1084
1084
|
}
|
|
1085
1085
|
export declare interface ObjectExpression extends BaseNode {
|
|
1086
|
-
type: AST_NODE_TYPES.ObjectExpression;
|
|
1087
1086
|
properties: ObjectLiteralElement[];
|
|
1087
|
+
type: AST_NODE_TYPES.ObjectExpression;
|
|
1088
1088
|
}
|
|
1089
1089
|
export declare type ObjectLiteralElement = Property | SpreadElement;
|
|
1090
1090
|
export declare type ObjectLiteralElementLike = ObjectLiteralElement;
|
|
1091
1091
|
export declare interface ObjectPattern extends BaseNode {
|
|
1092
|
-
|
|
1092
|
+
decorators: Decorator[];
|
|
1093
|
+
optional: boolean;
|
|
1093
1094
|
properties: (Property | RestElement)[];
|
|
1095
|
+
type: AST_NODE_TYPES.ObjectPattern;
|
|
1094
1096
|
typeAnnotation: TSTypeAnnotation | undefined;
|
|
1095
|
-
optional: boolean;
|
|
1096
|
-
decorators: Decorator[];
|
|
1097
1097
|
}
|
|
1098
|
-
export declare type OptionalRangeAndLoc<T> =
|
|
1099
|
-
range?: Range;
|
|
1098
|
+
export declare type OptionalRangeAndLoc<T> = {
|
|
1100
1099
|
loc?: SourceLocation;
|
|
1101
|
-
|
|
1100
|
+
range?: Range;
|
|
1101
|
+
} & Pick<T, Exclude<keyof T, 'loc' | 'range'>>;
|
|
1102
1102
|
export declare type Parameter = ArrayPattern | AssignmentPattern | Identifier | ObjectPattern | RestElement | TSParameterProperty;
|
|
1103
1103
|
export declare interface Position {
|
|
1104
|
-
/**
|
|
1105
|
-
* Line number (1-indexed)
|
|
1106
|
-
*/
|
|
1107
|
-
line: number;
|
|
1108
1104
|
/**
|
|
1109
1105
|
* Column number on the line (0-indexed)
|
|
1110
1106
|
*/
|
|
1111
1107
|
column: number;
|
|
1108
|
+
/**
|
|
1109
|
+
* Line number (1-indexed)
|
|
1110
|
+
*/
|
|
1111
|
+
line: number;
|
|
1112
1112
|
}
|
|
1113
1113
|
export declare type PrimaryExpression = ArrayExpression | ArrayPattern | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | JSXOpeningElement | LiteralExpression | MetaProperty | ObjectExpression | ObjectPattern | Super | TemplateLiteral | ThisExpression | TSNullKeyword;
|
|
1114
1114
|
export declare interface PrivateIdentifier extends BaseNode {
|
|
1115
|
-
type: AST_NODE_TYPES.PrivateIdentifier;
|
|
1116
1115
|
name: string;
|
|
1116
|
+
type: AST_NODE_TYPES.PrivateIdentifier;
|
|
1117
1117
|
}
|
|
1118
1118
|
export declare interface Program extends NodeOrTokenData {
|
|
1119
|
-
type: AST_NODE_TYPES.Program;
|
|
1120
1119
|
body: ProgramStatement[];
|
|
1121
|
-
sourceType: 'module' | 'script';
|
|
1122
1120
|
comments: Comment[] | undefined;
|
|
1121
|
+
sourceType: 'module' | 'script';
|
|
1123
1122
|
tokens: Token[] | undefined;
|
|
1123
|
+
type: AST_NODE_TYPES.Program;
|
|
1124
1124
|
}
|
|
1125
1125
|
export declare type ProgramStatement = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | Statement | TSImportEqualsDeclaration | TSNamespaceExportDeclaration;
|
|
1126
1126
|
export declare type Property = PropertyComputedName | PropertyNonComputedName;
|
|
1127
1127
|
declare interface PropertyBase extends BaseNode {
|
|
1128
|
-
type: AST_NODE_TYPES.Property;
|
|
1129
|
-
key: PropertyName;
|
|
1130
|
-
value: AssignmentPattern | BindingName | Expression | TSEmptyBodyFunctionExpression;
|
|
1131
1128
|
computed: boolean;
|
|
1129
|
+
key: PropertyName;
|
|
1130
|
+
kind: 'get' | 'init' | 'set';
|
|
1132
1131
|
method: boolean;
|
|
1133
|
-
shorthand: boolean;
|
|
1134
1132
|
optional: boolean;
|
|
1135
|
-
|
|
1133
|
+
shorthand: boolean;
|
|
1134
|
+
type: AST_NODE_TYPES.Property;
|
|
1135
|
+
value: AssignmentPattern | BindingName | Expression | TSEmptyBodyFunctionExpression;
|
|
1136
1136
|
}
|
|
1137
1137
|
export declare interface PropertyComputedName extends PropertyBase {
|
|
1138
|
-
key: PropertyNameComputed;
|
|
1139
1138
|
computed: true;
|
|
1139
|
+
key: PropertyNameComputed;
|
|
1140
1140
|
}
|
|
1141
1141
|
export declare type PropertyDefinition = PropertyDefinitionComputedName | PropertyDefinitionNonComputedName;
|
|
1142
1142
|
declare interface PropertyDefinitionBase extends BaseNode {
|
|
1143
|
-
|
|
1144
|
-
value: Expression | null;
|
|
1143
|
+
accessibility: Accessibility | undefined;
|
|
1145
1144
|
computed: boolean;
|
|
1146
|
-
static: boolean;
|
|
1147
1145
|
declare: boolean;
|
|
1148
|
-
readonly: boolean;
|
|
1149
1146
|
decorators: Decorator[];
|
|
1150
|
-
accessibility: Accessibility | undefined;
|
|
1151
|
-
optional: boolean;
|
|
1152
1147
|
definite: boolean;
|
|
1153
|
-
|
|
1148
|
+
key: PropertyName;
|
|
1149
|
+
optional: boolean;
|
|
1154
1150
|
override: boolean;
|
|
1151
|
+
readonly: boolean;
|
|
1152
|
+
static: boolean;
|
|
1153
|
+
typeAnnotation: TSTypeAnnotation | undefined;
|
|
1154
|
+
value: Expression | null;
|
|
1155
1155
|
}
|
|
1156
1156
|
export declare interface PropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase {
|
|
1157
1157
|
type: AST_NODE_TYPES.PropertyDefinition;
|
|
1158
1158
|
}
|
|
1159
1159
|
declare interface PropertyDefinitionComputedNameBase extends PropertyDefinitionBase {
|
|
1160
|
-
key: PropertyNameComputed;
|
|
1161
1160
|
computed: true;
|
|
1161
|
+
key: PropertyNameComputed;
|
|
1162
1162
|
}
|
|
1163
1163
|
export declare interface PropertyDefinitionNonComputedName extends ClassPropertyDefinitionNonComputedNameBase {
|
|
1164
1164
|
type: AST_NODE_TYPES.PropertyDefinition;
|
|
1165
1165
|
}
|
|
1166
1166
|
declare interface PropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase {
|
|
1167
|
-
key: PropertyNameNonComputed;
|
|
1168
1167
|
computed: false;
|
|
1168
|
+
key: PropertyNameNonComputed;
|
|
1169
1169
|
}
|
|
1170
1170
|
export declare type PropertyName = ClassPropertyNameNonComputed | PropertyNameComputed | PropertyNameNonComputed;
|
|
1171
1171
|
export declare type PropertyNameComputed = Expression;
|
|
1172
1172
|
export declare type PropertyNameNonComputed = Identifier | NumberLiteral | StringLiteral;
|
|
1173
1173
|
export declare interface PropertyNonComputedName extends PropertyBase {
|
|
1174
|
-
key: PropertyNameNonComputed;
|
|
1175
1174
|
computed: false;
|
|
1175
|
+
key: PropertyNameNonComputed;
|
|
1176
1176
|
}
|
|
1177
1177
|
export declare interface PunctuatorToken extends BaseToken {
|
|
1178
1178
|
type: AST_TOKEN_TYPES.Punctuator;
|
|
1179
1179
|
value: ValueOf<PunctuatorTokenToText>;
|
|
1180
1180
|
}
|
|
1181
1181
|
export declare interface PunctuatorTokenToText extends AssignmentOperatorToText {
|
|
1182
|
-
[SyntaxKind.
|
|
1182
|
+
[SyntaxKind.AmpersandAmpersandToken]: '&&';
|
|
1183
|
+
[SyntaxKind.AmpersandToken]: '&';
|
|
1184
|
+
[SyntaxKind.AsteriskAsteriskToken]: '**';
|
|
1185
|
+
[SyntaxKind.AsteriskToken]: '*';
|
|
1186
|
+
[SyntaxKind.AtToken]: '@';
|
|
1187
|
+
[SyntaxKind.BacktickToken]: '`';
|
|
1188
|
+
[SyntaxKind.BarBarToken]: '||';
|
|
1189
|
+
[SyntaxKind.BarToken]: '|';
|
|
1190
|
+
[SyntaxKind.CaretToken]: '^';
|
|
1183
1191
|
[SyntaxKind.CloseBraceToken]: '}';
|
|
1184
|
-
[SyntaxKind.OpenParenToken]: '(';
|
|
1185
|
-
[SyntaxKind.CloseParenToken]: ')';
|
|
1186
|
-
[SyntaxKind.OpenBracketToken]: '[';
|
|
1187
1192
|
[SyntaxKind.CloseBracketToken]: ']';
|
|
1188
|
-
[SyntaxKind.
|
|
1189
|
-
[SyntaxKind.
|
|
1190
|
-
[SyntaxKind.SemicolonToken]: ';';
|
|
1193
|
+
[SyntaxKind.CloseParenToken]: ')';
|
|
1194
|
+
[SyntaxKind.ColonToken]: ':';
|
|
1191
1195
|
[SyntaxKind.CommaToken]: ',';
|
|
1192
|
-
[SyntaxKind.
|
|
1193
|
-
[SyntaxKind.
|
|
1194
|
-
[SyntaxKind.LessThanSlashToken]: '</';
|
|
1195
|
-
[SyntaxKind.GreaterThanToken]: '>';
|
|
1196
|
-
[SyntaxKind.LessThanEqualsToken]: '<=';
|
|
1197
|
-
[SyntaxKind.GreaterThanEqualsToken]: '>=';
|
|
1198
|
-
[SyntaxKind.EqualsEqualsToken]: '==';
|
|
1199
|
-
[SyntaxKind.ExclamationEqualsToken]: '!=';
|
|
1196
|
+
[SyntaxKind.DotDotDotToken]: '...';
|
|
1197
|
+
[SyntaxKind.DotToken]: '.';
|
|
1200
1198
|
[SyntaxKind.EqualsEqualsEqualsToken]: '===';
|
|
1201
|
-
[SyntaxKind.
|
|
1199
|
+
[SyntaxKind.EqualsEqualsToken]: '==';
|
|
1202
1200
|
[SyntaxKind.EqualsGreaterThanToken]: '=>';
|
|
1203
|
-
[SyntaxKind.
|
|
1201
|
+
[SyntaxKind.ExclamationEqualsEqualsToken]: '!==';
|
|
1202
|
+
[SyntaxKind.ExclamationEqualsToken]: '!=';
|
|
1203
|
+
[SyntaxKind.ExclamationToken]: '!';
|
|
1204
|
+
[SyntaxKind.GreaterThanEqualsToken]: '>=';
|
|
1205
|
+
[SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>';
|
|
1206
|
+
[SyntaxKind.GreaterThanGreaterThanToken]: '>>';
|
|
1207
|
+
[SyntaxKind.GreaterThanToken]: '>';
|
|
1208
|
+
[SyntaxKind.HashToken]: '#';
|
|
1209
|
+
[SyntaxKind.LessThanEqualsToken]: '<=';
|
|
1210
|
+
[SyntaxKind.LessThanLessThanToken]: '<<';
|
|
1211
|
+
[SyntaxKind.LessThanSlashToken]: '</';
|
|
1212
|
+
[SyntaxKind.LessThanToken]: '<';
|
|
1213
|
+
[SyntaxKind.MinusMinusToken]: '--';
|
|
1204
1214
|
[SyntaxKind.MinusToken]: '-';
|
|
1205
|
-
[SyntaxKind.
|
|
1206
|
-
[SyntaxKind.
|
|
1207
|
-
[SyntaxKind.
|
|
1215
|
+
[SyntaxKind.OpenBraceToken]: '{';
|
|
1216
|
+
[SyntaxKind.OpenBracketToken]: '[';
|
|
1217
|
+
[SyntaxKind.OpenParenToken]: '(';
|
|
1208
1218
|
[SyntaxKind.PercentToken]: '%';
|
|
1209
1219
|
[SyntaxKind.PlusPlusToken]: '++';
|
|
1210
|
-
[SyntaxKind.
|
|
1211
|
-
[SyntaxKind.
|
|
1212
|
-
[SyntaxKind.GreaterThanGreaterThanToken]: '>>';
|
|
1213
|
-
[SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>';
|
|
1214
|
-
[SyntaxKind.AmpersandToken]: '&';
|
|
1215
|
-
[SyntaxKind.BarToken]: '|';
|
|
1216
|
-
[SyntaxKind.CaretToken]: '^';
|
|
1217
|
-
[SyntaxKind.ExclamationToken]: '!';
|
|
1218
|
-
[SyntaxKind.TildeToken]: '~';
|
|
1219
|
-
[SyntaxKind.AmpersandAmpersandToken]: '&&';
|
|
1220
|
-
[SyntaxKind.BarBarToken]: '||';
|
|
1221
|
-
[SyntaxKind.QuestionToken]: '?';
|
|
1222
|
-
[SyntaxKind.ColonToken]: ':';
|
|
1223
|
-
[SyntaxKind.AtToken]: '@';
|
|
1220
|
+
[SyntaxKind.PlusToken]: '+';
|
|
1221
|
+
[SyntaxKind.QuestionDotToken]: '?.';
|
|
1224
1222
|
[SyntaxKind.QuestionQuestionToken]: '??';
|
|
1225
|
-
[SyntaxKind.
|
|
1226
|
-
[SyntaxKind.
|
|
1223
|
+
[SyntaxKind.QuestionToken]: '?';
|
|
1224
|
+
[SyntaxKind.SemicolonToken]: ';';
|
|
1225
|
+
[SyntaxKind.SlashToken]: '/';
|
|
1226
|
+
[SyntaxKind.TildeToken]: '~';
|
|
1227
1227
|
}
|
|
1228
1228
|
/**
|
|
1229
1229
|
* An array of two numbers.
|
|
@@ -1232,53 +1232,53 @@ export declare interface PunctuatorTokenToText extends AssignmentOperatorToText
|
|
|
1232
1232
|
*/
|
|
1233
1233
|
export declare type Range = [number, number];
|
|
1234
1234
|
export declare interface RegExpLiteral extends LiteralBase {
|
|
1235
|
-
value: RegExp | null;
|
|
1236
1235
|
regex: {
|
|
1237
|
-
pattern: string;
|
|
1238
1236
|
flags: string;
|
|
1237
|
+
pattern: string;
|
|
1239
1238
|
};
|
|
1239
|
+
value: RegExp | null;
|
|
1240
1240
|
}
|
|
1241
1241
|
export declare interface RegularExpressionToken extends BaseToken {
|
|
1242
|
-
type: AST_TOKEN_TYPES.RegularExpression;
|
|
1243
1242
|
regex: {
|
|
1244
|
-
pattern: string;
|
|
1245
1243
|
flags: string;
|
|
1244
|
+
pattern: string;
|
|
1246
1245
|
};
|
|
1246
|
+
type: AST_TOKEN_TYPES.RegularExpression;
|
|
1247
1247
|
}
|
|
1248
1248
|
export declare interface RestElement extends BaseNode {
|
|
1249
|
-
type: AST_NODE_TYPES.RestElement;
|
|
1250
1249
|
argument: DestructuringPattern;
|
|
1251
|
-
|
|
1250
|
+
decorators: Decorator[];
|
|
1252
1251
|
optional: boolean;
|
|
1252
|
+
type: AST_NODE_TYPES.RestElement;
|
|
1253
|
+
typeAnnotation: TSTypeAnnotation | undefined;
|
|
1253
1254
|
value: AssignmentPattern | undefined;
|
|
1254
|
-
decorators: Decorator[];
|
|
1255
1255
|
}
|
|
1256
1256
|
export declare interface ReturnStatement extends BaseNode {
|
|
1257
|
-
type: AST_NODE_TYPES.ReturnStatement;
|
|
1258
1257
|
argument: Expression | null;
|
|
1258
|
+
type: AST_NODE_TYPES.ReturnStatement;
|
|
1259
1259
|
}
|
|
1260
1260
|
export declare interface SequenceExpression extends BaseNode {
|
|
1261
|
-
type: AST_NODE_TYPES.SequenceExpression;
|
|
1262
1261
|
expressions: Expression[];
|
|
1262
|
+
type: AST_NODE_TYPES.SequenceExpression;
|
|
1263
1263
|
}
|
|
1264
1264
|
export declare interface SourceLocation {
|
|
1265
|
-
/**
|
|
1266
|
-
* The position of the first character of the parsed source region
|
|
1267
|
-
*/
|
|
1268
|
-
start: Position;
|
|
1269
1265
|
/**
|
|
1270
1266
|
* The position of the first character after the parsed source region
|
|
1271
1267
|
*/
|
|
1272
1268
|
end: Position;
|
|
1269
|
+
/**
|
|
1270
|
+
* The position of the first character of the parsed source region
|
|
1271
|
+
*/
|
|
1272
|
+
start: Position;
|
|
1273
1273
|
}
|
|
1274
1274
|
export declare interface SpreadElement extends BaseNode {
|
|
1275
|
-
type: AST_NODE_TYPES.SpreadElement;
|
|
1276
1275
|
argument: Expression;
|
|
1276
|
+
type: AST_NODE_TYPES.SpreadElement;
|
|
1277
1277
|
}
|
|
1278
1278
|
export declare type Statement = BlockStatement | BreakStatement | ClassDeclarationWithName | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclarationWithName | IfStatement | ImportDeclaration | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | TSDeclareFunction | TSEnumDeclaration | TSExportAssignment | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration | VariableDeclaration | WhileStatement | WithStatement;
|
|
1279
1279
|
export declare interface StaticBlock extends BaseNode {
|
|
1280
|
-
type: AST_NODE_TYPES.StaticBlock;
|
|
1281
1280
|
body: Statement[];
|
|
1281
|
+
type: AST_NODE_TYPES.StaticBlock;
|
|
1282
1282
|
}
|
|
1283
1283
|
export declare interface StringLiteral extends LiteralBase {
|
|
1284
1284
|
value: string;
|
|
@@ -1290,14 +1290,14 @@ export declare interface Super extends BaseNode {
|
|
|
1290
1290
|
type: AST_NODE_TYPES.Super;
|
|
1291
1291
|
}
|
|
1292
1292
|
export declare interface SwitchCase extends BaseNode {
|
|
1293
|
-
type: AST_NODE_TYPES.SwitchCase;
|
|
1294
|
-
test: Expression | null;
|
|
1295
1293
|
consequent: Statement[];
|
|
1294
|
+
test: Expression | null;
|
|
1295
|
+
type: AST_NODE_TYPES.SwitchCase;
|
|
1296
1296
|
}
|
|
1297
1297
|
export declare interface SwitchStatement extends BaseNode {
|
|
1298
|
-
type: AST_NODE_TYPES.SwitchStatement;
|
|
1299
|
-
discriminant: Expression;
|
|
1300
1298
|
cases: SwitchCase[];
|
|
1299
|
+
discriminant: Expression;
|
|
1300
|
+
type: AST_NODE_TYPES.SwitchStatement;
|
|
1301
1301
|
}
|
|
1302
1302
|
export declare interface TaggedTemplateExpression extends BaseNode {
|
|
1303
1303
|
quasi: TemplateLiteral;
|
|
@@ -1306,17 +1306,17 @@ export declare interface TaggedTemplateExpression extends BaseNode {
|
|
|
1306
1306
|
typeArguments: TSTypeParameterInstantiation | undefined;
|
|
1307
1307
|
}
|
|
1308
1308
|
export declare interface TemplateElement extends BaseNode {
|
|
1309
|
+
tail: boolean;
|
|
1309
1310
|
type: AST_NODE_TYPES.TemplateElement;
|
|
1310
1311
|
value: {
|
|
1311
|
-
raw: string;
|
|
1312
1312
|
cooked: string;
|
|
1313
|
+
raw: string;
|
|
1313
1314
|
};
|
|
1314
|
-
tail: boolean;
|
|
1315
1315
|
}
|
|
1316
1316
|
export declare interface TemplateLiteral extends BaseNode {
|
|
1317
|
-
type: AST_NODE_TYPES.TemplateLiteral;
|
|
1318
|
-
quasis: TemplateElement[];
|
|
1319
1317
|
expressions: Expression[];
|
|
1318
|
+
quasis: TemplateElement[];
|
|
1319
|
+
type: AST_NODE_TYPES.TemplateLiteral;
|
|
1320
1320
|
}
|
|
1321
1321
|
export declare interface TemplateToken extends BaseToken {
|
|
1322
1322
|
type: AST_TOKEN_TYPES.Template;
|
|
@@ -1325,15 +1325,15 @@ export declare interface ThisExpression extends BaseNode {
|
|
|
1325
1325
|
type: AST_NODE_TYPES.ThisExpression;
|
|
1326
1326
|
}
|
|
1327
1327
|
export declare interface ThrowStatement extends BaseNode {
|
|
1328
|
-
type: AST_NODE_TYPES.ThrowStatement;
|
|
1329
1328
|
argument: Statement | TSAsExpression | null;
|
|
1329
|
+
type: AST_NODE_TYPES.ThrowStatement;
|
|
1330
1330
|
}
|
|
1331
1331
|
export declare type Token = BooleanToken | Comment | IdentifierToken | JSXIdentifierToken | JSXTextToken | KeywordToken | NullToken | NumericToken | PunctuatorToken | RegularExpressionToken | StringToken | TemplateToken;
|
|
1332
1332
|
export declare interface TryStatement extends BaseNode {
|
|
1333
|
-
type: AST_NODE_TYPES.TryStatement;
|
|
1334
1333
|
block: BlockStatement;
|
|
1335
|
-
handler: CatchClause | null;
|
|
1336
1334
|
finalizer: BlockStatement | null;
|
|
1335
|
+
handler: CatchClause | null;
|
|
1336
|
+
type: AST_NODE_TYPES.TryStatement;
|
|
1337
1337
|
}
|
|
1338
1338
|
export declare type TSAbstractAccessorProperty = TSAbstractAccessorPropertyComputedName | TSAbstractAccessorPropertyNonComputedName;
|
|
1339
1339
|
export declare interface TSAbstractAccessorPropertyComputedName extends PropertyDefinitionComputedNameBase {
|
|
@@ -1367,12 +1367,12 @@ export declare interface TSAnyKeyword extends BaseNode {
|
|
|
1367
1367
|
type: AST_NODE_TYPES.TSAnyKeyword;
|
|
1368
1368
|
}
|
|
1369
1369
|
export declare interface TSArrayType extends BaseNode {
|
|
1370
|
-
type: AST_NODE_TYPES.TSArrayType;
|
|
1371
1370
|
elementType: TypeNode;
|
|
1371
|
+
type: AST_NODE_TYPES.TSArrayType;
|
|
1372
1372
|
}
|
|
1373
1373
|
export declare interface TSAsExpression extends BaseNode {
|
|
1374
|
-
type: AST_NODE_TYPES.TSAsExpression;
|
|
1375
1374
|
expression: Expression;
|
|
1375
|
+
type: AST_NODE_TYPES.TSAsExpression;
|
|
1376
1376
|
typeAnnotation: TypeNode;
|
|
1377
1377
|
}
|
|
1378
1378
|
export declare interface TSAsyncKeyword extends BaseNode {
|
|
@@ -1391,22 +1391,21 @@ export declare interface TSClassImplements extends TSHeritageBase {
|
|
|
1391
1391
|
type: AST_NODE_TYPES.TSClassImplements;
|
|
1392
1392
|
}
|
|
1393
1393
|
export declare interface TSConditionalType extends BaseNode {
|
|
1394
|
-
type: AST_NODE_TYPES.TSConditionalType;
|
|
1395
1394
|
checkType: TypeNode;
|
|
1396
1395
|
extendsType: TypeNode;
|
|
1397
|
-
trueType: TypeNode;
|
|
1398
1396
|
falseType: TypeNode;
|
|
1397
|
+
trueType: TypeNode;
|
|
1398
|
+
type: AST_NODE_TYPES.TSConditionalType;
|
|
1399
1399
|
}
|
|
1400
1400
|
export declare interface TSConstructorType extends TSFunctionSignatureBase {
|
|
1401
|
-
type: AST_NODE_TYPES.TSConstructorType;
|
|
1402
1401
|
abstract: boolean;
|
|
1402
|
+
type: AST_NODE_TYPES.TSConstructorType;
|
|
1403
1403
|
}
|
|
1404
1404
|
export declare interface TSConstructSignatureDeclaration extends TSFunctionSignatureBase {
|
|
1405
1405
|
type: AST_NODE_TYPES.TSConstructSignatureDeclaration;
|
|
1406
1406
|
}
|
|
1407
1407
|
export declare type TSDeclareFunction = TSDeclareFunctionNoDeclare | TSDeclareFunctionWithDeclare;
|
|
1408
1408
|
declare interface TSDeclareFunctionBase extends FunctionBase {
|
|
1409
|
-
type: AST_NODE_TYPES.TSDeclareFunction;
|
|
1410
1409
|
/**
|
|
1411
1410
|
* TS1183: An implementation cannot be declared in ambient contexts.
|
|
1412
1411
|
*/
|
|
@@ -1416,6 +1415,7 @@ declare interface TSDeclareFunctionBase extends FunctionBase {
|
|
|
1416
1415
|
*/
|
|
1417
1416
|
declare: boolean;
|
|
1418
1417
|
expression: false;
|
|
1418
|
+
type: AST_NODE_TYPES.TSDeclareFunction;
|
|
1419
1419
|
}
|
|
1420
1420
|
/**
|
|
1421
1421
|
* Function declaration without the `declare` keyword:
|
|
@@ -1454,16 +1454,15 @@ export declare interface TSDeclareKeyword extends BaseNode {
|
|
|
1454
1454
|
type: AST_NODE_TYPES.TSDeclareKeyword;
|
|
1455
1455
|
}
|
|
1456
1456
|
export declare interface TSEmptyBodyFunctionExpression extends FunctionBase {
|
|
1457
|
-
type: AST_NODE_TYPES.TSEmptyBodyFunctionExpression;
|
|
1458
1457
|
body: null;
|
|
1459
1458
|
id: null;
|
|
1459
|
+
type: AST_NODE_TYPES.TSEmptyBodyFunctionExpression;
|
|
1460
1460
|
}
|
|
1461
1461
|
export declare interface TSEnumBody extends BaseNode {
|
|
1462
|
-
type: AST_NODE_TYPES.TSEnumBody;
|
|
1463
1462
|
members: TSEnumMember[];
|
|
1463
|
+
type: AST_NODE_TYPES.TSEnumBody;
|
|
1464
1464
|
}
|
|
1465
1465
|
export declare interface TSEnumDeclaration extends BaseNode {
|
|
1466
|
-
type: AST_NODE_TYPES.TSEnumDeclaration;
|
|
1467
1466
|
/**
|
|
1468
1467
|
* The body of the enum.
|
|
1469
1468
|
*/
|
|
@@ -1493,13 +1492,14 @@ export declare interface TSEnumDeclaration extends BaseNode {
|
|
|
1493
1492
|
* @deprecated Use {@link body} instead.
|
|
1494
1493
|
*/
|
|
1495
1494
|
members: TSEnumMember[];
|
|
1495
|
+
type: AST_NODE_TYPES.TSEnumDeclaration;
|
|
1496
1496
|
}
|
|
1497
1497
|
export declare type TSEnumMember = TSEnumMemberComputedName | TSEnumMemberNonComputedName;
|
|
1498
1498
|
declare interface TSEnumMemberBase extends BaseNode {
|
|
1499
|
-
|
|
1499
|
+
computed: boolean;
|
|
1500
1500
|
id: PropertyNameComputed | PropertyNameNonComputed;
|
|
1501
1501
|
initializer: Expression | undefined;
|
|
1502
|
-
|
|
1502
|
+
type: AST_NODE_TYPES.TSEnumMember;
|
|
1503
1503
|
}
|
|
1504
1504
|
/**
|
|
1505
1505
|
* this should only really happen in semantically invalid code (errors 1164 and 2452)
|
|
@@ -1516,23 +1516,23 @@ declare interface TSEnumMemberBase extends BaseNode {
|
|
|
1516
1516
|
* ```
|
|
1517
1517
|
*/
|
|
1518
1518
|
export declare interface TSEnumMemberComputedName extends TSEnumMemberBase {
|
|
1519
|
-
id: PropertyNameComputed;
|
|
1520
1519
|
computed: true;
|
|
1520
|
+
id: PropertyNameComputed;
|
|
1521
1521
|
}
|
|
1522
1522
|
export declare interface TSEnumMemberNonComputedName extends TSEnumMemberBase {
|
|
1523
|
-
id: PropertyNameNonComputed;
|
|
1524
1523
|
computed: false;
|
|
1524
|
+
id: PropertyNameNonComputed;
|
|
1525
1525
|
}
|
|
1526
1526
|
export declare interface TSExportAssignment extends BaseNode {
|
|
1527
|
-
type: AST_NODE_TYPES.TSExportAssignment;
|
|
1528
1527
|
expression: Expression;
|
|
1528
|
+
type: AST_NODE_TYPES.TSExportAssignment;
|
|
1529
1529
|
}
|
|
1530
1530
|
export declare interface TSExportKeyword extends BaseNode {
|
|
1531
1531
|
type: AST_NODE_TYPES.TSExportKeyword;
|
|
1532
1532
|
}
|
|
1533
1533
|
export declare interface TSExternalModuleReference extends BaseNode {
|
|
1534
|
-
type: AST_NODE_TYPES.TSExternalModuleReference;
|
|
1535
1534
|
expression: StringLiteral;
|
|
1535
|
+
type: AST_NODE_TYPES.TSExternalModuleReference;
|
|
1536
1536
|
}
|
|
1537
1537
|
declare interface TSFunctionSignatureBase extends BaseNode {
|
|
1538
1538
|
params: Parameter[];
|
|
@@ -1548,11 +1548,15 @@ declare interface TSHeritageBase extends BaseNode {
|
|
|
1548
1548
|
}
|
|
1549
1549
|
export declare type TSImportEqualsDeclaration = TSImportEqualsNamespaceDeclaration | TSImportEqualsRequireDeclaration;
|
|
1550
1550
|
declare interface TSImportEqualsDeclarationBase extends BaseNode {
|
|
1551
|
-
type: AST_NODE_TYPES.TSImportEqualsDeclaration;
|
|
1552
1551
|
/**
|
|
1553
1552
|
* The locally imported name.
|
|
1554
1553
|
*/
|
|
1555
1554
|
id: Identifier;
|
|
1555
|
+
/**
|
|
1556
|
+
* The kind of the import. Always `'value'` unless `moduleReference` is a
|
|
1557
|
+
* `TSExternalModuleReference`.
|
|
1558
|
+
*/
|
|
1559
|
+
importKind: ImportKind;
|
|
1556
1560
|
/**
|
|
1557
1561
|
* The value being aliased.
|
|
1558
1562
|
* @example
|
|
@@ -1563,13 +1567,13 @@ declare interface TSImportEqualsDeclarationBase extends BaseNode {
|
|
|
1563
1567
|
* ```
|
|
1564
1568
|
*/
|
|
1565
1569
|
moduleReference: Identifier | TSExternalModuleReference | TSQualifiedName;
|
|
1566
|
-
|
|
1567
|
-
* The kind of the import. Always `'value'` unless `moduleReference` is a
|
|
1568
|
-
* `TSExternalModuleReference`.
|
|
1569
|
-
*/
|
|
1570
|
-
importKind: ImportKind;
|
|
1570
|
+
type: AST_NODE_TYPES.TSImportEqualsDeclaration;
|
|
1571
1571
|
}
|
|
1572
1572
|
export declare interface TSImportEqualsNamespaceDeclaration extends TSImportEqualsDeclarationBase {
|
|
1573
|
+
/**
|
|
1574
|
+
* The kind of the import.
|
|
1575
|
+
*/
|
|
1576
|
+
importKind: 'value';
|
|
1573
1577
|
/**
|
|
1574
1578
|
* The value being aliased.
|
|
1575
1579
|
* ```
|
|
@@ -1578,12 +1582,12 @@ export declare interface TSImportEqualsNamespaceDeclaration extends TSImportEqua
|
|
|
1578
1582
|
* ```
|
|
1579
1583
|
*/
|
|
1580
1584
|
moduleReference: Identifier | TSQualifiedName;
|
|
1585
|
+
}
|
|
1586
|
+
export declare interface TSImportEqualsRequireDeclaration extends TSImportEqualsDeclarationBase {
|
|
1581
1587
|
/**
|
|
1582
1588
|
* The kind of the import.
|
|
1583
1589
|
*/
|
|
1584
|
-
importKind:
|
|
1585
|
-
}
|
|
1586
|
-
export declare interface TSImportEqualsRequireDeclaration extends TSImportEqualsDeclarationBase {
|
|
1590
|
+
importKind: ImportKind;
|
|
1587
1591
|
/**
|
|
1588
1592
|
* The value being aliased.
|
|
1589
1593
|
* ```
|
|
@@ -1591,45 +1595,40 @@ export declare interface TSImportEqualsRequireDeclaration extends TSImportEquals
|
|
|
1591
1595
|
* ```
|
|
1592
1596
|
*/
|
|
1593
1597
|
moduleReference: TSExternalModuleReference;
|
|
1594
|
-
/**
|
|
1595
|
-
* The kind of the import.
|
|
1596
|
-
*/
|
|
1597
|
-
importKind: ImportKind;
|
|
1598
1598
|
}
|
|
1599
1599
|
export declare interface TSImportType extends BaseNode {
|
|
1600
|
-
type: AST_NODE_TYPES.TSImportType;
|
|
1601
1600
|
argument: TypeNode;
|
|
1602
1601
|
qualifier: EntityName | null;
|
|
1602
|
+
type: AST_NODE_TYPES.TSImportType;
|
|
1603
1603
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
1604
1604
|
}
|
|
1605
1605
|
export declare interface TSIndexedAccessType extends BaseNode {
|
|
1606
|
-
type: AST_NODE_TYPES.TSIndexedAccessType;
|
|
1607
|
-
objectType: TypeNode;
|
|
1608
1606
|
indexType: TypeNode;
|
|
1607
|
+
objectType: TypeNode;
|
|
1608
|
+
type: AST_NODE_TYPES.TSIndexedAccessType;
|
|
1609
1609
|
}
|
|
1610
1610
|
export declare interface TSIndexSignature extends BaseNode {
|
|
1611
|
-
|
|
1611
|
+
accessibility: Accessibility | undefined;
|
|
1612
1612
|
parameters: Parameter[];
|
|
1613
|
-
typeAnnotation: TSTypeAnnotation | undefined;
|
|
1614
1613
|
readonly: boolean;
|
|
1615
|
-
accessibility: Accessibility | undefined;
|
|
1616
1614
|
static: boolean;
|
|
1615
|
+
type: AST_NODE_TYPES.TSIndexSignature;
|
|
1616
|
+
typeAnnotation: TSTypeAnnotation | undefined;
|
|
1617
1617
|
}
|
|
1618
1618
|
export declare interface TSInferType extends BaseNode {
|
|
1619
1619
|
type: AST_NODE_TYPES.TSInferType;
|
|
1620
1620
|
typeParameter: TSTypeParameter;
|
|
1621
1621
|
}
|
|
1622
1622
|
export declare interface TSInstantiationExpression extends BaseNode {
|
|
1623
|
-
type: AST_NODE_TYPES.TSInstantiationExpression;
|
|
1624
1623
|
expression: Expression;
|
|
1624
|
+
type: AST_NODE_TYPES.TSInstantiationExpression;
|
|
1625
1625
|
typeArguments: TSTypeParameterInstantiation;
|
|
1626
1626
|
}
|
|
1627
1627
|
export declare interface TSInterfaceBody extends BaseNode {
|
|
1628
|
-
type: AST_NODE_TYPES.TSInterfaceBody;
|
|
1629
1628
|
body: TypeElement[];
|
|
1629
|
+
type: AST_NODE_TYPES.TSInterfaceBody;
|
|
1630
1630
|
}
|
|
1631
1631
|
export declare interface TSInterfaceDeclaration extends BaseNode {
|
|
1632
|
-
type: AST_NODE_TYPES.TSInterfaceDeclaration;
|
|
1633
1632
|
/**
|
|
1634
1633
|
* The body of the interface
|
|
1635
1634
|
*/
|
|
@@ -1646,6 +1645,7 @@ export declare interface TSInterfaceDeclaration extends BaseNode {
|
|
|
1646
1645
|
* The name of this interface
|
|
1647
1646
|
*/
|
|
1648
1647
|
id: Identifier;
|
|
1648
|
+
type: AST_NODE_TYPES.TSInterfaceDeclaration;
|
|
1649
1649
|
/**
|
|
1650
1650
|
* The generic type parameters declared for the interface. Empty declaration
|
|
1651
1651
|
* (`<>`) is different from no declaration.
|
|
@@ -1663,23 +1663,22 @@ export declare interface TSIntrinsicKeyword extends BaseNode {
|
|
|
1663
1663
|
type: AST_NODE_TYPES.TSIntrinsicKeyword;
|
|
1664
1664
|
}
|
|
1665
1665
|
export declare interface TSLiteralType extends BaseNode {
|
|
1666
|
-
type: AST_NODE_TYPES.TSLiteralType;
|
|
1667
1666
|
literal: LiteralExpression | UnaryExpression | UpdateExpression;
|
|
1667
|
+
type: AST_NODE_TYPES.TSLiteralType;
|
|
1668
1668
|
}
|
|
1669
1669
|
export declare interface TSMappedType extends BaseNode {
|
|
1670
|
-
type: AST_NODE_TYPES.TSMappedType;
|
|
1671
|
-
/** @deprecated Use {@link `constraint`} and {@link `key`} instead. */
|
|
1672
|
-
typeParameter: TSTypeParameter;
|
|
1673
1670
|
constraint: TypeNode;
|
|
1674
1671
|
key: Identifier;
|
|
1675
|
-
readonly: boolean | '-' | '+' | undefined;
|
|
1676
|
-
optional: boolean | '-' | '+' | undefined;
|
|
1677
|
-
typeAnnotation: TypeNode | undefined;
|
|
1678
1672
|
nameType: TypeNode | null;
|
|
1673
|
+
optional: '+' | '-' | boolean | undefined;
|
|
1674
|
+
readonly: '+' | '-' | boolean | undefined;
|
|
1675
|
+
type: AST_NODE_TYPES.TSMappedType;
|
|
1676
|
+
typeAnnotation: TypeNode | undefined;
|
|
1677
|
+
/** @deprecated Use {@link `constraint`} and {@link `key`} instead. */
|
|
1678
|
+
typeParameter: TSTypeParameter;
|
|
1679
1679
|
}
|
|
1680
1680
|
export declare type TSMethodSignature = TSMethodSignatureComputedName | TSMethodSignatureNonComputedName;
|
|
1681
1681
|
declare interface TSMethodSignatureBase extends BaseNode {
|
|
1682
|
-
type: AST_NODE_TYPES.TSMethodSignature;
|
|
1683
1682
|
accessibility: Accessibility | undefined;
|
|
1684
1683
|
computed: boolean;
|
|
1685
1684
|
key: PropertyName;
|
|
@@ -1689,37 +1688,36 @@ declare interface TSMethodSignatureBase extends BaseNode {
|
|
|
1689
1688
|
readonly: boolean;
|
|
1690
1689
|
returnType: TSTypeAnnotation | undefined;
|
|
1691
1690
|
static: boolean;
|
|
1691
|
+
type: AST_NODE_TYPES.TSMethodSignature;
|
|
1692
1692
|
typeParameters: TSTypeParameterDeclaration | undefined;
|
|
1693
1693
|
}
|
|
1694
1694
|
export declare interface TSMethodSignatureComputedName extends TSMethodSignatureBase {
|
|
1695
|
-
key: PropertyNameComputed;
|
|
1696
1695
|
computed: true;
|
|
1696
|
+
key: PropertyNameComputed;
|
|
1697
1697
|
}
|
|
1698
1698
|
export declare interface TSMethodSignatureNonComputedName extends TSMethodSignatureBase {
|
|
1699
|
-
key: PropertyNameNonComputed;
|
|
1700
1699
|
computed: false;
|
|
1700
|
+
key: PropertyNameNonComputed;
|
|
1701
1701
|
}
|
|
1702
1702
|
export declare interface TSModuleBlock extends BaseNode {
|
|
1703
|
-
type: AST_NODE_TYPES.TSModuleBlock;
|
|
1704
1703
|
body: ProgramStatement[];
|
|
1704
|
+
type: AST_NODE_TYPES.TSModuleBlock;
|
|
1705
1705
|
}
|
|
1706
1706
|
export declare type TSModuleDeclaration = TSModuleDeclarationGlobal | TSModuleDeclarationModule | TSModuleDeclarationNamespace;
|
|
1707
1707
|
declare interface TSModuleDeclarationBase extends BaseNode {
|
|
1708
|
-
type: AST_NODE_TYPES.TSModuleDeclaration;
|
|
1709
|
-
/**
|
|
1710
|
-
* The name of the module
|
|
1711
|
-
* ```
|
|
1712
|
-
* namespace A {}
|
|
1713
|
-
* namespace A.B.C {}
|
|
1714
|
-
* module 'a' {}
|
|
1715
|
-
* ```
|
|
1716
|
-
*/
|
|
1717
|
-
id: Identifier | Literal | TSQualifiedName;
|
|
1718
1708
|
/**
|
|
1719
1709
|
* The body of the module.
|
|
1720
1710
|
* This can only be `undefined` for the code `declare module 'mod';`
|
|
1721
1711
|
*/
|
|
1722
1712
|
body?: TSModuleBlock;
|
|
1713
|
+
/**
|
|
1714
|
+
* Whether the module is `declare`d
|
|
1715
|
+
* @example
|
|
1716
|
+
* ```ts
|
|
1717
|
+
* declare namespace F {}
|
|
1718
|
+
* ```
|
|
1719
|
+
*/
|
|
1720
|
+
declare: boolean;
|
|
1723
1721
|
/**
|
|
1724
1722
|
* Whether this is a global declaration
|
|
1725
1723
|
* @example
|
|
@@ -1731,13 +1729,14 @@ declare interface TSModuleDeclarationBase extends BaseNode {
|
|
|
1731
1729
|
*/
|
|
1732
1730
|
global: boolean;
|
|
1733
1731
|
/**
|
|
1734
|
-
*
|
|
1735
|
-
*
|
|
1736
|
-
*
|
|
1737
|
-
*
|
|
1732
|
+
* The name of the module
|
|
1733
|
+
* ```
|
|
1734
|
+
* namespace A {}
|
|
1735
|
+
* namespace A.B.C {}
|
|
1736
|
+
* module 'a' {}
|
|
1738
1737
|
* ```
|
|
1739
1738
|
*/
|
|
1740
|
-
|
|
1739
|
+
id: Identifier | Literal | TSQualifiedName;
|
|
1741
1740
|
/**
|
|
1742
1741
|
* The keyword used to define this module declaration
|
|
1743
1742
|
* @example
|
|
@@ -1753,14 +1752,15 @@ declare interface TSModuleDeclarationBase extends BaseNode {
|
|
|
1753
1752
|
* ```
|
|
1754
1753
|
*/
|
|
1755
1754
|
kind: TSModuleDeclarationKind;
|
|
1755
|
+
type: AST_NODE_TYPES.TSModuleDeclaration;
|
|
1756
1756
|
}
|
|
1757
1757
|
export declare interface TSModuleDeclarationGlobal extends TSModuleDeclarationBase {
|
|
1758
|
-
|
|
1758
|
+
body: TSModuleBlock;
|
|
1759
1759
|
/**
|
|
1760
1760
|
* This will always be an Identifier with name `global`
|
|
1761
1761
|
*/
|
|
1762
1762
|
id: Identifier;
|
|
1763
|
-
|
|
1763
|
+
kind: 'global';
|
|
1764
1764
|
}
|
|
1765
1765
|
export declare type TSModuleDeclarationKind = 'global' | 'module' | 'namespace';
|
|
1766
1766
|
export declare type TSModuleDeclarationModule = TSModuleDeclarationModuleWithIdentifierId | TSModuleDeclarationModuleWithStringId;
|
|
@@ -1774,9 +1774,9 @@ declare interface TSModuleDeclarationModuleBase extends TSModuleDeclarationBase
|
|
|
1774
1774
|
* ```
|
|
1775
1775
|
*/
|
|
1776
1776
|
export declare interface TSModuleDeclarationModuleWithIdentifierId extends TSModuleDeclarationModuleBase {
|
|
1777
|
-
kind: 'module';
|
|
1778
|
-
id: Identifier;
|
|
1779
1777
|
body: TSModuleBlock;
|
|
1778
|
+
id: Identifier;
|
|
1779
|
+
kind: 'module';
|
|
1780
1780
|
}
|
|
1781
1781
|
export declare type TSModuleDeclarationModuleWithStringId = TSModuleDeclarationModuleWithStringIdDeclared | TSModuleDeclarationModuleWithStringIdNotDeclared;
|
|
1782
1782
|
/**
|
|
@@ -1787,10 +1787,10 @@ export declare type TSModuleDeclarationModuleWithStringId = TSModuleDeclarationM
|
|
|
1787
1787
|
* ```
|
|
1788
1788
|
*/
|
|
1789
1789
|
export declare interface TSModuleDeclarationModuleWithStringIdDeclared extends TSModuleDeclarationModuleBase {
|
|
1790
|
-
kind: 'module';
|
|
1791
|
-
id: StringLiteral;
|
|
1792
|
-
declare: true;
|
|
1793
1790
|
body?: TSModuleBlock;
|
|
1791
|
+
declare: true;
|
|
1792
|
+
id: StringLiteral;
|
|
1793
|
+
kind: 'module';
|
|
1794
1794
|
}
|
|
1795
1795
|
/**
|
|
1796
1796
|
* A string module declaration that is not declared:
|
|
@@ -1799,21 +1799,21 @@ export declare interface TSModuleDeclarationModuleWithStringIdDeclared extends T
|
|
|
1799
1799
|
* ```
|
|
1800
1800
|
*/
|
|
1801
1801
|
export declare interface TSModuleDeclarationModuleWithStringIdNotDeclared extends TSModuleDeclarationModuleBase {
|
|
1802
|
-
kind: 'module';
|
|
1803
|
-
id: StringLiteral;
|
|
1804
|
-
declare: false;
|
|
1805
1802
|
body: TSModuleBlock;
|
|
1803
|
+
declare: false;
|
|
1804
|
+
id: StringLiteral;
|
|
1805
|
+
kind: 'module';
|
|
1806
1806
|
}
|
|
1807
1807
|
export declare interface TSModuleDeclarationNamespace extends TSModuleDeclarationBase {
|
|
1808
|
-
kind: 'namespace';
|
|
1809
|
-
id: Identifier | TSQualifiedName;
|
|
1810
1808
|
body: TSModuleBlock;
|
|
1809
|
+
id: Identifier | TSQualifiedName;
|
|
1810
|
+
kind: 'namespace';
|
|
1811
1811
|
}
|
|
1812
1812
|
export declare interface TSNamedTupleMember extends BaseNode {
|
|
1813
|
-
type: AST_NODE_TYPES.TSNamedTupleMember;
|
|
1814
1813
|
elementType: TypeNode;
|
|
1815
1814
|
label: Identifier;
|
|
1816
1815
|
optional: boolean;
|
|
1816
|
+
type: AST_NODE_TYPES.TSNamedTupleMember;
|
|
1817
1817
|
}
|
|
1818
1818
|
/**
|
|
1819
1819
|
* For the following declaration:
|
|
@@ -1822,18 +1822,18 @@ export declare interface TSNamedTupleMember extends BaseNode {
|
|
|
1822
1822
|
* ```
|
|
1823
1823
|
*/
|
|
1824
1824
|
export declare interface TSNamespaceExportDeclaration extends BaseNode {
|
|
1825
|
-
type: AST_NODE_TYPES.TSNamespaceExportDeclaration;
|
|
1826
1825
|
/**
|
|
1827
1826
|
* The name of the global variable that's exported as namespace
|
|
1828
1827
|
*/
|
|
1829
1828
|
id: Identifier;
|
|
1829
|
+
type: AST_NODE_TYPES.TSNamespaceExportDeclaration;
|
|
1830
1830
|
}
|
|
1831
1831
|
export declare interface TSNeverKeyword extends BaseNode {
|
|
1832
1832
|
type: AST_NODE_TYPES.TSNeverKeyword;
|
|
1833
1833
|
}
|
|
1834
1834
|
export declare interface TSNonNullExpression extends BaseNode {
|
|
1835
|
-
type: AST_NODE_TYPES.TSNonNullExpression;
|
|
1836
1835
|
expression: Expression;
|
|
1836
|
+
type: AST_NODE_TYPES.TSNonNullExpression;
|
|
1837
1837
|
}
|
|
1838
1838
|
export declare interface TSNullKeyword extends BaseNode {
|
|
1839
1839
|
type: AST_NODE_TYPES.TSNullKeyword;
|
|
@@ -1849,35 +1849,35 @@ export declare interface TSOptionalType extends BaseNode {
|
|
|
1849
1849
|
typeAnnotation: TypeNode;
|
|
1850
1850
|
}
|
|
1851
1851
|
export declare interface TSParameterProperty extends BaseNode {
|
|
1852
|
-
type: AST_NODE_TYPES.TSParameterProperty;
|
|
1853
1852
|
accessibility: Accessibility | undefined;
|
|
1854
|
-
|
|
1855
|
-
static: boolean;
|
|
1853
|
+
decorators: Decorator[];
|
|
1856
1854
|
override: boolean;
|
|
1857
1855
|
parameter: AssignmentPattern | BindingName | RestElement;
|
|
1858
|
-
|
|
1856
|
+
readonly: boolean;
|
|
1857
|
+
static: boolean;
|
|
1858
|
+
type: AST_NODE_TYPES.TSParameterProperty;
|
|
1859
1859
|
}
|
|
1860
1860
|
export declare interface TSPrivateKeyword extends BaseNode {
|
|
1861
1861
|
type: AST_NODE_TYPES.TSPrivateKeyword;
|
|
1862
1862
|
}
|
|
1863
1863
|
export declare type TSPropertySignature = TSPropertySignatureComputedName | TSPropertySignatureNonComputedName;
|
|
1864
1864
|
declare interface TSPropertySignatureBase extends BaseNode {
|
|
1865
|
-
|
|
1865
|
+
accessibility: Accessibility | undefined;
|
|
1866
|
+
computed: boolean;
|
|
1866
1867
|
key: PropertyName;
|
|
1867
1868
|
optional: boolean;
|
|
1868
|
-
computed: boolean;
|
|
1869
|
-
typeAnnotation: TSTypeAnnotation | undefined;
|
|
1870
1869
|
readonly: boolean;
|
|
1871
1870
|
static: boolean;
|
|
1872
|
-
|
|
1871
|
+
type: AST_NODE_TYPES.TSPropertySignature;
|
|
1872
|
+
typeAnnotation: TSTypeAnnotation | undefined;
|
|
1873
1873
|
}
|
|
1874
1874
|
export declare interface TSPropertySignatureComputedName extends TSPropertySignatureBase {
|
|
1875
|
-
key: PropertyNameComputed;
|
|
1876
1875
|
computed: true;
|
|
1876
|
+
key: PropertyNameComputed;
|
|
1877
1877
|
}
|
|
1878
1878
|
export declare interface TSPropertySignatureNonComputedName extends TSPropertySignatureBase {
|
|
1879
|
-
key: PropertyNameNonComputed;
|
|
1880
1879
|
computed: false;
|
|
1880
|
+
key: PropertyNameNonComputed;
|
|
1881
1881
|
}
|
|
1882
1882
|
export declare interface TSProtectedKeyword extends BaseNode {
|
|
1883
1883
|
type: AST_NODE_TYPES.TSProtectedKeyword;
|
|
@@ -1886,9 +1886,9 @@ export declare interface TSPublicKeyword extends BaseNode {
|
|
|
1886
1886
|
type: AST_NODE_TYPES.TSPublicKeyword;
|
|
1887
1887
|
}
|
|
1888
1888
|
export declare interface TSQualifiedName extends BaseNode {
|
|
1889
|
-
type: AST_NODE_TYPES.TSQualifiedName;
|
|
1890
1889
|
left: EntityName;
|
|
1891
1890
|
right: Identifier;
|
|
1891
|
+
type: AST_NODE_TYPES.TSQualifiedName;
|
|
1892
1892
|
}
|
|
1893
1893
|
export declare interface TSReadonlyKeyword extends BaseNode {
|
|
1894
1894
|
type: AST_NODE_TYPES.TSReadonlyKeyword;
|
|
@@ -1898,8 +1898,8 @@ export declare interface TSRestType extends BaseNode {
|
|
|
1898
1898
|
typeAnnotation: TypeNode;
|
|
1899
1899
|
}
|
|
1900
1900
|
export declare interface TSSatisfiesExpression extends BaseNode {
|
|
1901
|
-
type: AST_NODE_TYPES.TSSatisfiesExpression;
|
|
1902
1901
|
expression: Expression;
|
|
1902
|
+
type: AST_NODE_TYPES.TSSatisfiesExpression;
|
|
1903
1903
|
typeAnnotation: TypeNode;
|
|
1904
1904
|
}
|
|
1905
1905
|
export declare interface TSStaticKeyword extends BaseNode {
|
|
@@ -1912,19 +1912,18 @@ export declare interface TSSymbolKeyword extends BaseNode {
|
|
|
1912
1912
|
type: AST_NODE_TYPES.TSSymbolKeyword;
|
|
1913
1913
|
}
|
|
1914
1914
|
export declare interface TSTemplateLiteralType extends BaseNode {
|
|
1915
|
-
type: AST_NODE_TYPES.TSTemplateLiteralType;
|
|
1916
1915
|
quasis: TemplateElement[];
|
|
1916
|
+
type: AST_NODE_TYPES.TSTemplateLiteralType;
|
|
1917
1917
|
types: TypeNode[];
|
|
1918
1918
|
}
|
|
1919
1919
|
export declare interface TSThisType extends BaseNode {
|
|
1920
1920
|
type: AST_NODE_TYPES.TSThisType;
|
|
1921
1921
|
}
|
|
1922
1922
|
export declare interface TSTupleType extends BaseNode {
|
|
1923
|
-
type: AST_NODE_TYPES.TSTupleType;
|
|
1924
1923
|
elementTypes: TypeNode[];
|
|
1924
|
+
type: AST_NODE_TYPES.TSTupleType;
|
|
1925
1925
|
}
|
|
1926
1926
|
export declare interface TSTypeAliasDeclaration extends BaseNode {
|
|
1927
|
-
type: AST_NODE_TYPES.TSTypeAliasDeclaration;
|
|
1928
1927
|
/**
|
|
1929
1928
|
* Whether the type was `declare`d.
|
|
1930
1929
|
* @example
|
|
@@ -1937,6 +1936,7 @@ export declare interface TSTypeAliasDeclaration extends BaseNode {
|
|
|
1937
1936
|
* The name of the type.
|
|
1938
1937
|
*/
|
|
1939
1938
|
id: Identifier;
|
|
1939
|
+
type: AST_NODE_TYPES.TSTypeAliasDeclaration;
|
|
1940
1940
|
/**
|
|
1941
1941
|
* The "value" (type) of the declaration
|
|
1942
1942
|
*/
|
|
@@ -1952,45 +1952,45 @@ export declare interface TSTypeAnnotation extends BaseNode {
|
|
|
1952
1952
|
typeAnnotation: TypeNode;
|
|
1953
1953
|
}
|
|
1954
1954
|
export declare interface TSTypeAssertion extends BaseNode {
|
|
1955
|
+
expression: Expression;
|
|
1955
1956
|
type: AST_NODE_TYPES.TSTypeAssertion;
|
|
1956
1957
|
typeAnnotation: TypeNode;
|
|
1957
|
-
expression: Expression;
|
|
1958
1958
|
}
|
|
1959
1959
|
export declare interface TSTypeLiteral extends BaseNode {
|
|
1960
|
-
type: AST_NODE_TYPES.TSTypeLiteral;
|
|
1961
1960
|
members: TypeElement[];
|
|
1961
|
+
type: AST_NODE_TYPES.TSTypeLiteral;
|
|
1962
1962
|
}
|
|
1963
1963
|
export declare interface TSTypeOperator extends BaseNode {
|
|
1964
|
-
type: AST_NODE_TYPES.TSTypeOperator;
|
|
1965
1964
|
operator: 'keyof' | 'readonly' | 'unique';
|
|
1965
|
+
type: AST_NODE_TYPES.TSTypeOperator;
|
|
1966
1966
|
typeAnnotation: TypeNode | undefined;
|
|
1967
1967
|
}
|
|
1968
1968
|
export declare interface TSTypeParameter extends BaseNode {
|
|
1969
|
-
|
|
1970
|
-
name: Identifier;
|
|
1969
|
+
const: boolean;
|
|
1971
1970
|
constraint: TypeNode | undefined;
|
|
1972
1971
|
default: TypeNode | undefined;
|
|
1973
1972
|
in: boolean;
|
|
1973
|
+
name: Identifier;
|
|
1974
1974
|
out: boolean;
|
|
1975
|
-
|
|
1975
|
+
type: AST_NODE_TYPES.TSTypeParameter;
|
|
1976
1976
|
}
|
|
1977
1977
|
export declare interface TSTypeParameterDeclaration extends BaseNode {
|
|
1978
|
-
type: AST_NODE_TYPES.TSTypeParameterDeclaration;
|
|
1979
1978
|
params: TSTypeParameter[];
|
|
1979
|
+
type: AST_NODE_TYPES.TSTypeParameterDeclaration;
|
|
1980
1980
|
}
|
|
1981
1981
|
export declare interface TSTypeParameterInstantiation extends BaseNode {
|
|
1982
|
-
type: AST_NODE_TYPES.TSTypeParameterInstantiation;
|
|
1983
1982
|
params: TypeNode[];
|
|
1983
|
+
type: AST_NODE_TYPES.TSTypeParameterInstantiation;
|
|
1984
1984
|
}
|
|
1985
1985
|
export declare interface TSTypePredicate extends BaseNode {
|
|
1986
|
-
type: AST_NODE_TYPES.TSTypePredicate;
|
|
1987
1986
|
asserts: boolean;
|
|
1988
1987
|
parameterName: Identifier | TSThisType;
|
|
1988
|
+
type: AST_NODE_TYPES.TSTypePredicate;
|
|
1989
1989
|
typeAnnotation: TSTypeAnnotation | null;
|
|
1990
1990
|
}
|
|
1991
1991
|
export declare interface TSTypeQuery extends BaseNode {
|
|
1992
|
-
type: AST_NODE_TYPES.TSTypeQuery;
|
|
1993
1992
|
exprName: EntityName | TSImportType;
|
|
1993
|
+
type: AST_NODE_TYPES.TSTypeQuery;
|
|
1994
1994
|
typeArguments: TSTypeParameterInstantiation | undefined;
|
|
1995
1995
|
}
|
|
1996
1996
|
export declare interface TSTypeReference extends BaseNode {
|
|
@@ -2015,21 +2015,20 @@ export declare interface TSVoidKeyword extends BaseNode {
|
|
|
2015
2015
|
export declare type TypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSIndexSignature | TSMethodSignature | TSPropertySignature;
|
|
2016
2016
|
export declare type TypeNode = TSAbstractKeyword | TSAnyKeyword | TSArrayType | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSConditionalType | TSConstructorType | TSDeclareKeyword | TSExportKeyword | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSNamedTupleMember | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSPrivateKeyword | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword;
|
|
2017
2017
|
export declare interface UnaryExpression extends UnaryExpressionBase {
|
|
2018
|
+
operator: '!' | '+' | '~' | '-' | 'delete' | 'typeof' | 'void';
|
|
2018
2019
|
type: AST_NODE_TYPES.UnaryExpression;
|
|
2019
|
-
operator: '-' | '!' | '+' | '~' | 'delete' | 'typeof' | 'void';
|
|
2020
2020
|
}
|
|
2021
2021
|
declare interface UnaryExpressionBase extends BaseNode {
|
|
2022
|
+
argument: Expression;
|
|
2022
2023
|
operator: string;
|
|
2023
2024
|
prefix: boolean;
|
|
2024
|
-
argument: Expression;
|
|
2025
2025
|
}
|
|
2026
2026
|
export declare interface UpdateExpression extends UnaryExpressionBase {
|
|
2027
|
+
operator: '++' | '--';
|
|
2027
2028
|
type: AST_NODE_TYPES.UpdateExpression;
|
|
2028
|
-
operator: '--' | '++';
|
|
2029
2029
|
}
|
|
2030
2030
|
export declare type UsingDeclaration = UsingInForOfDeclaration | UsingInNormalContextDeclaration;
|
|
2031
2031
|
declare interface UsingDeclarationBase extends BaseNode {
|
|
2032
|
-
type: AST_NODE_TYPES.VariableDeclaration;
|
|
2033
2032
|
/**
|
|
2034
2033
|
* This value will always be `false`
|
|
2035
2034
|
* because 'declare' modifier cannot appear on a 'using' declaration.
|
|
@@ -2044,6 +2043,7 @@ declare interface UsingDeclarationBase extends BaseNode {
|
|
|
2044
2043
|
* ```
|
|
2045
2044
|
*/
|
|
2046
2045
|
kind: 'await using' | 'using';
|
|
2046
|
+
type: AST_NODE_TYPES.VariableDeclaration;
|
|
2047
2047
|
}
|
|
2048
2048
|
export declare type UsingDeclarator = UsingInForOfDeclarator | UsingInNormalContextDeclarator;
|
|
2049
2049
|
export declare interface UsingInForOfDeclaration extends UsingDeclarationBase {
|
|
@@ -2058,9 +2058,9 @@ export declare interface UsingInForOfDeclaration extends UsingDeclarationBase {
|
|
|
2058
2058
|
declarations: [UsingInForOfDeclarator];
|
|
2059
2059
|
}
|
|
2060
2060
|
export declare interface UsingInForOfDeclarator extends VariableDeclaratorBase {
|
|
2061
|
+
definite: false;
|
|
2061
2062
|
id: Identifier;
|
|
2062
2063
|
init: null;
|
|
2063
|
-
definite: false;
|
|
2064
2064
|
}
|
|
2065
2065
|
export declare interface UsingInNormalContextDeclaration extends UsingDeclarationBase {
|
|
2066
2066
|
/**
|
|
@@ -2075,15 +2075,20 @@ export declare interface UsingInNormalContextDeclaration extends UsingDeclaratio
|
|
|
2075
2075
|
declarations: UsingInNormalContextDeclarator[];
|
|
2076
2076
|
}
|
|
2077
2077
|
export declare interface UsingInNormalContextDeclarator extends VariableDeclaratorBase {
|
|
2078
|
+
definite: false;
|
|
2078
2079
|
id: Identifier;
|
|
2079
2080
|
init: Expression;
|
|
2080
|
-
definite: false;
|
|
2081
2081
|
}
|
|
2082
2082
|
declare type ValueOf<T> = T[keyof T];
|
|
2083
2083
|
export declare type VariableDeclaration = LetOrConstOrVarDeclaration | UsingDeclaration;
|
|
2084
2084
|
export declare type VariableDeclarator = LetOrConstOrVarDeclarator | UsingDeclarator;
|
|
2085
2085
|
declare interface VariableDeclaratorBase extends BaseNode {
|
|
2086
|
-
|
|
2086
|
+
/**
|
|
2087
|
+
* Whether there's definite assignment assertion (`let x!: number`).
|
|
2088
|
+
* If `true`, then: `id` must be an identifier with a type annotation,
|
|
2089
|
+
* `init` must be `null`, and the declarator must be a `var`/`let` declarator.
|
|
2090
|
+
*/
|
|
2091
|
+
definite: boolean;
|
|
2087
2092
|
/**
|
|
2088
2093
|
* The name(s) of the variable(s).
|
|
2089
2094
|
*/
|
|
@@ -2093,42 +2098,37 @@ declare interface VariableDeclaratorBase extends BaseNode {
|
|
|
2093
2098
|
* in a `declare const`.
|
|
2094
2099
|
*/
|
|
2095
2100
|
init: Expression | null;
|
|
2096
|
-
|
|
2097
|
-
* Whether there's definite assignment assertion (`let x!: number`).
|
|
2098
|
-
* If `true`, then: `id` must be an identifier with a type annotation,
|
|
2099
|
-
* `init` must be `null`, and the declarator must be a `var`/`let` declarator.
|
|
2100
|
-
*/
|
|
2101
|
-
definite: boolean;
|
|
2101
|
+
type: AST_NODE_TYPES.VariableDeclarator;
|
|
2102
2102
|
}
|
|
2103
2103
|
export declare interface VariableDeclaratorDefiniteAssignment extends VariableDeclaratorBase {
|
|
2104
|
+
definite: true;
|
|
2104
2105
|
/**
|
|
2105
2106
|
* The name of the variable. Must have a type annotation.
|
|
2106
2107
|
*/
|
|
2107
2108
|
id: Identifier;
|
|
2108
2109
|
init: null;
|
|
2109
|
-
definite: true;
|
|
2110
2110
|
}
|
|
2111
2111
|
export declare interface VariableDeclaratorMaybeInit extends VariableDeclaratorBase {
|
|
2112
2112
|
definite: false;
|
|
2113
2113
|
}
|
|
2114
2114
|
export declare interface VariableDeclaratorNoInit extends VariableDeclaratorBase {
|
|
2115
|
-
init: null;
|
|
2116
2115
|
definite: false;
|
|
2116
|
+
init: null;
|
|
2117
2117
|
}
|
|
2118
2118
|
export declare interface WhileStatement extends BaseNode {
|
|
2119
|
-
type: AST_NODE_TYPES.WhileStatement;
|
|
2120
|
-
test: Expression;
|
|
2121
2119
|
body: Statement;
|
|
2120
|
+
test: Expression;
|
|
2121
|
+
type: AST_NODE_TYPES.WhileStatement;
|
|
2122
2122
|
}
|
|
2123
2123
|
export declare interface WithStatement extends BaseNode {
|
|
2124
|
-
type: AST_NODE_TYPES.WithStatement;
|
|
2125
|
-
object: Expression;
|
|
2126
2124
|
body: Statement;
|
|
2125
|
+
object: Expression;
|
|
2126
|
+
type: AST_NODE_TYPES.WithStatement;
|
|
2127
2127
|
}
|
|
2128
2128
|
export declare interface YieldExpression extends BaseNode {
|
|
2129
|
-
type: AST_NODE_TYPES.YieldExpression;
|
|
2130
|
-
delegate: boolean;
|
|
2131
2129
|
argument: Expression | undefined;
|
|
2130
|
+
delegate: boolean;
|
|
2131
|
+
type: AST_NODE_TYPES.YieldExpression;
|
|
2132
2132
|
}
|
|
2133
2133
|
export {};
|
|
2134
2134
|
//# sourceMappingURL=ast-spec.d.ts.map
|