@umijs/bundler-utils 4.0.7 → 4.0.10
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.
- package/compiled/@babel/core/index.d.ts +30 -2
- package/compiled/@babel/generator/index.d.ts +0 -1
- package/compiled/@babel/parser/typings/babel-parser.d.ts +12 -1
- package/compiled/@babel/traverse/index.d.ts +16 -9
- package/compiled/@babel/types/lib/index-legacy.d.ts +88 -48
- package/compiled/babel/index.js +101236 -132421
- package/dist/https.d.ts +0 -1
- package/dist/https.js +91 -67
- package/dist/index.js +75 -37
- package/dist/types.js +17 -2
- package/package.json +29 -27
|
@@ -42,7 +42,7 @@ interface BaseNode {
|
|
|
42
42
|
extra?: Record<string, unknown>;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export type Node = AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | DecimalLiteral | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBody | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | IndexedAccessType | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | Miscellaneous | MixedTypeAnnotation | ModuleDeclaration | ModuleExpression | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalIndexedAccessType | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Standardized | Statement | StaticBlock | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBaseType | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TopicReference | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeScript | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression;
|
|
45
|
+
export type Node = Accessor | AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassAccessorProperty | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | DecimalLiteral | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBody | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | IndexedAccessType | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | Miscellaneous | MixedTypeAnnotation | ModuleDeclaration | ModuleExpression | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalIndexedAccessType | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Standardized | Statement | StaticBlock | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBaseType | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInstantiationExpression | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TopicReference | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeScript | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression;
|
|
46
46
|
|
|
47
47
|
export interface ArrayExpression extends BaseNode {
|
|
48
48
|
type: "ArrayExpression";
|
|
@@ -58,7 +58,7 @@ export interface AssignmentExpression extends BaseNode {
|
|
|
58
58
|
|
|
59
59
|
export interface BinaryExpression extends BaseNode {
|
|
60
60
|
type: "BinaryExpression";
|
|
61
|
-
operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=";
|
|
61
|
+
operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=" | "|>";
|
|
62
62
|
left: Expression | PrivateName;
|
|
63
63
|
right: Expression;
|
|
64
64
|
}
|
|
@@ -91,7 +91,7 @@ export interface BreakStatement extends BaseNode {
|
|
|
91
91
|
|
|
92
92
|
export interface CallExpression extends BaseNode {
|
|
93
93
|
type: "CallExpression";
|
|
94
|
-
callee: Expression | V8IntrinsicIdentifier;
|
|
94
|
+
callee: Expression | Super | V8IntrinsicIdentifier;
|
|
95
95
|
arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>;
|
|
96
96
|
optional: true | false | null;
|
|
97
97
|
typeArguments: TypeParameterInstantiation | null;
|
|
@@ -165,6 +165,7 @@ export interface FunctionDeclaration extends BaseNode {
|
|
|
165
165
|
generator: boolean;
|
|
166
166
|
async: boolean;
|
|
167
167
|
declare: boolean | null;
|
|
168
|
+
predicate: DeclaredPredicate | InferredPredicate | null;
|
|
168
169
|
returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
|
|
169
170
|
typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
|
|
170
171
|
}
|
|
@@ -176,6 +177,7 @@ export interface FunctionExpression extends BaseNode {
|
|
|
176
177
|
body: BlockStatement;
|
|
177
178
|
generator: boolean;
|
|
178
179
|
async: boolean;
|
|
180
|
+
predicate: DeclaredPredicate | InferredPredicate | null;
|
|
179
181
|
returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
|
|
180
182
|
typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
|
|
181
183
|
}
|
|
@@ -235,7 +237,7 @@ export interface LogicalExpression extends BaseNode {
|
|
|
235
237
|
|
|
236
238
|
export interface MemberExpression extends BaseNode {
|
|
237
239
|
type: "MemberExpression";
|
|
238
|
-
object: Expression;
|
|
240
|
+
object: Expression | Super;
|
|
239
241
|
property: Expression | Identifier | PrivateName;
|
|
240
242
|
computed: boolean;
|
|
241
243
|
optional: true | false | null;
|
|
@@ -243,7 +245,7 @@ export interface MemberExpression extends BaseNode {
|
|
|
243
245
|
|
|
244
246
|
export interface NewExpression extends BaseNode {
|
|
245
247
|
type: "NewExpression";
|
|
246
|
-
callee: Expression | V8IntrinsicIdentifier;
|
|
248
|
+
callee: Expression | Super | V8IntrinsicIdentifier;
|
|
247
249
|
arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>;
|
|
248
250
|
optional: true | false | null;
|
|
249
251
|
typeArguments: TypeParameterInstantiation | null;
|
|
@@ -267,7 +269,7 @@ export interface ObjectExpression extends BaseNode {
|
|
|
267
269
|
export interface ObjectMethod extends BaseNode {
|
|
268
270
|
type: "ObjectMethod";
|
|
269
271
|
kind: "method" | "get" | "set";
|
|
270
|
-
key: Expression | Identifier | StringLiteral | NumericLiteral;
|
|
272
|
+
key: Expression | Identifier | StringLiteral | NumericLiteral | BigIntLiteral;
|
|
271
273
|
params: Array<Identifier | Pattern | RestElement>;
|
|
272
274
|
body: BlockStatement;
|
|
273
275
|
computed: boolean;
|
|
@@ -280,7 +282,7 @@ export interface ObjectMethod extends BaseNode {
|
|
|
280
282
|
|
|
281
283
|
export interface ObjectProperty extends BaseNode {
|
|
282
284
|
type: "ObjectProperty";
|
|
283
|
-
key: Expression | Identifier | StringLiteral | NumericLiteral;
|
|
285
|
+
key: Expression | Identifier | StringLiteral | NumericLiteral | BigIntLiteral | DecimalLiteral | PrivateName;
|
|
284
286
|
value: Expression | PatternLike;
|
|
285
287
|
computed: boolean;
|
|
286
288
|
shorthand: boolean;
|
|
@@ -380,7 +382,7 @@ export interface WithStatement extends BaseNode {
|
|
|
380
382
|
|
|
381
383
|
export interface AssignmentPattern extends BaseNode {
|
|
382
384
|
type: "AssignmentPattern";
|
|
383
|
-
left: Identifier | ObjectPattern | ArrayPattern | MemberExpression;
|
|
385
|
+
left: Identifier | ObjectPattern | ArrayPattern | MemberExpression | TSAsExpression | TSTypeAssertion | TSNonNullExpression;
|
|
384
386
|
right: Expression;
|
|
385
387
|
decorators: Array<Decorator> | null;
|
|
386
388
|
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
|
|
@@ -388,7 +390,7 @@ export interface AssignmentPattern extends BaseNode {
|
|
|
388
390
|
|
|
389
391
|
export interface ArrayPattern extends BaseNode {
|
|
390
392
|
type: "ArrayPattern";
|
|
391
|
-
elements: Array<null | PatternLike>;
|
|
393
|
+
elements: Array<null | PatternLike | LVal>;
|
|
392
394
|
decorators: Array<Decorator> | null;
|
|
393
395
|
optional: boolean | null;
|
|
394
396
|
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
|
|
@@ -401,13 +403,14 @@ export interface ArrowFunctionExpression extends BaseNode {
|
|
|
401
403
|
async: boolean;
|
|
402
404
|
expression: boolean;
|
|
403
405
|
generator: boolean;
|
|
406
|
+
predicate: DeclaredPredicate | InferredPredicate | null;
|
|
404
407
|
returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
|
|
405
408
|
typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
|
|
406
409
|
}
|
|
407
410
|
|
|
408
411
|
export interface ClassBody extends BaseNode {
|
|
409
412
|
type: "ClassBody";
|
|
410
|
-
body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | TSDeclareMethod | TSIndexSignature>;
|
|
413
|
+
body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>;
|
|
411
414
|
}
|
|
412
415
|
|
|
413
416
|
export interface ClassExpression extends BaseNode {
|
|
@@ -445,7 +448,7 @@ export interface ExportAllDeclaration extends BaseNode {
|
|
|
445
448
|
|
|
446
449
|
export interface ExportDefaultDeclaration extends BaseNode {
|
|
447
450
|
type: "ExportDefaultDeclaration";
|
|
448
|
-
declaration:
|
|
451
|
+
declaration: TSDeclareFunction | FunctionDeclaration | ClassDeclaration | Expression;
|
|
449
452
|
exportKind: "value" | null;
|
|
450
453
|
}
|
|
451
454
|
|
|
@@ -507,7 +510,7 @@ export interface MetaProperty extends BaseNode {
|
|
|
507
510
|
export interface ClassMethod extends BaseNode {
|
|
508
511
|
type: "ClassMethod";
|
|
509
512
|
kind: "get" | "set" | "method" | "constructor";
|
|
510
|
-
key: Identifier | StringLiteral | NumericLiteral | Expression;
|
|
513
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression;
|
|
511
514
|
params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
|
|
512
515
|
body: BlockStatement;
|
|
513
516
|
computed: boolean;
|
|
@@ -603,7 +606,25 @@ export interface OptionalCallExpression extends BaseNode {
|
|
|
603
606
|
|
|
604
607
|
export interface ClassProperty extends BaseNode {
|
|
605
608
|
type: "ClassProperty";
|
|
606
|
-
key: Identifier | StringLiteral | NumericLiteral | Expression;
|
|
609
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression;
|
|
610
|
+
value: Expression | null;
|
|
611
|
+
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
|
|
612
|
+
decorators: Array<Decorator> | null;
|
|
613
|
+
computed: boolean;
|
|
614
|
+
static: boolean;
|
|
615
|
+
abstract: boolean | null;
|
|
616
|
+
accessibility: "public" | "private" | "protected" | null;
|
|
617
|
+
declare: boolean | null;
|
|
618
|
+
definite: boolean | null;
|
|
619
|
+
optional: boolean | null;
|
|
620
|
+
override: boolean;
|
|
621
|
+
readonly: boolean | null;
|
|
622
|
+
variance: Variance | null;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export interface ClassAccessorProperty extends BaseNode {
|
|
626
|
+
type: "ClassAccessorProperty";
|
|
627
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression | PrivateName;
|
|
607
628
|
value: Expression | null;
|
|
608
629
|
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
|
|
609
630
|
decorators: Array<Decorator> | null;
|
|
@@ -624,7 +645,7 @@ export interface ClassPrivateProperty extends BaseNode {
|
|
|
624
645
|
key: PrivateName;
|
|
625
646
|
value: Expression | null;
|
|
626
647
|
decorators: Array<Decorator> | null;
|
|
627
|
-
static:
|
|
648
|
+
static: boolean;
|
|
628
649
|
definite: boolean | null;
|
|
629
650
|
readonly: boolean | null;
|
|
630
651
|
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
|
|
@@ -633,7 +654,7 @@ export interface ClassPrivateProperty extends BaseNode {
|
|
|
633
654
|
|
|
634
655
|
export interface ClassPrivateMethod extends BaseNode {
|
|
635
656
|
type: "ClassPrivateMethod";
|
|
636
|
-
kind: "get" | "set" | "method"
|
|
657
|
+
kind: "get" | "set" | "method";
|
|
637
658
|
key: PrivateName;
|
|
638
659
|
params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
|
|
639
660
|
body: BlockStatement;
|
|
@@ -848,9 +869,9 @@ export interface NumberTypeAnnotation extends BaseNode {
|
|
|
848
869
|
export interface ObjectTypeAnnotation extends BaseNode {
|
|
849
870
|
type: "ObjectTypeAnnotation";
|
|
850
871
|
properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>;
|
|
851
|
-
indexers: Array<ObjectTypeIndexer
|
|
852
|
-
callProperties: Array<ObjectTypeCallProperty
|
|
853
|
-
internalSlots: Array<ObjectTypeInternalSlot
|
|
872
|
+
indexers: Array<ObjectTypeIndexer>;
|
|
873
|
+
callProperties: Array<ObjectTypeCallProperty>;
|
|
874
|
+
internalSlots: Array<ObjectTypeInternalSlot>;
|
|
854
875
|
exact: boolean;
|
|
855
876
|
inexact: boolean | null;
|
|
856
877
|
}
|
|
@@ -1247,7 +1268,7 @@ export interface TSDeclareFunction extends BaseNode {
|
|
|
1247
1268
|
export interface TSDeclareMethod extends BaseNode {
|
|
1248
1269
|
type: "TSDeclareMethod";
|
|
1249
1270
|
decorators: Array<Decorator> | null;
|
|
1250
|
-
key: Identifier | StringLiteral | NumericLiteral | Expression;
|
|
1271
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression;
|
|
1251
1272
|
typeParameters: TSTypeParameterDeclaration | Noop | null;
|
|
1252
1273
|
params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
|
|
1253
1274
|
returnType: TSTypeAnnotation | Noop | null;
|
|
@@ -1288,7 +1309,7 @@ export interface TSPropertySignature extends BaseNode {
|
|
|
1288
1309
|
key: Expression;
|
|
1289
1310
|
typeAnnotation: TSTypeAnnotation | null;
|
|
1290
1311
|
initializer: Expression | null;
|
|
1291
|
-
computed: boolean
|
|
1312
|
+
computed: boolean;
|
|
1292
1313
|
kind: "get" | "set";
|
|
1293
1314
|
optional: boolean | null;
|
|
1294
1315
|
readonly: boolean | null;
|
|
@@ -1300,7 +1321,7 @@ export interface TSMethodSignature extends BaseNode {
|
|
|
1300
1321
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1301
1322
|
parameters: Array<Identifier | RestElement>;
|
|
1302
1323
|
typeAnnotation: TSTypeAnnotation | null;
|
|
1303
|
-
computed: boolean
|
|
1324
|
+
computed: boolean;
|
|
1304
1325
|
kind: "method" | "get" | "set";
|
|
1305
1326
|
optional: boolean | null;
|
|
1306
1327
|
}
|
|
@@ -1400,6 +1421,7 @@ export interface TSTypePredicate extends BaseNode {
|
|
|
1400
1421
|
export interface TSTypeQuery extends BaseNode {
|
|
1401
1422
|
type: "TSTypeQuery";
|
|
1402
1423
|
exprName: TSEntityName | TSImportType;
|
|
1424
|
+
typeParameters: TSTypeParameterInstantiation | null;
|
|
1403
1425
|
}
|
|
1404
1426
|
|
|
1405
1427
|
export interface TSTypeLiteral extends BaseNode {
|
|
@@ -1479,13 +1501,13 @@ export interface TSMappedType extends BaseNode {
|
|
|
1479
1501
|
typeParameter: TSTypeParameter;
|
|
1480
1502
|
typeAnnotation: TSType | null;
|
|
1481
1503
|
nameType: TSType | null;
|
|
1482
|
-
optional:
|
|
1483
|
-
readonly:
|
|
1504
|
+
optional: true | false | "+" | "-" | null;
|
|
1505
|
+
readonly: true | false | "+" | "-" | null;
|
|
1484
1506
|
}
|
|
1485
1507
|
|
|
1486
1508
|
export interface TSLiteralType extends BaseNode {
|
|
1487
1509
|
type: "TSLiteralType";
|
|
1488
|
-
literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression;
|
|
1510
|
+
literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | TemplateLiteral | UnaryExpression;
|
|
1489
1511
|
}
|
|
1490
1512
|
|
|
1491
1513
|
export interface TSExpressionWithTypeArguments extends BaseNode {
|
|
@@ -1516,6 +1538,12 @@ export interface TSTypeAliasDeclaration extends BaseNode {
|
|
|
1516
1538
|
declare: boolean | null;
|
|
1517
1539
|
}
|
|
1518
1540
|
|
|
1541
|
+
export interface TSInstantiationExpression extends BaseNode {
|
|
1542
|
+
type: "TSInstantiationExpression";
|
|
1543
|
+
expression: Expression;
|
|
1544
|
+
typeParameters: TSTypeParameterInstantiation | null;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1519
1547
|
export interface TSAsExpression extends BaseNode {
|
|
1520
1548
|
type: "TSAsExpression";
|
|
1521
1549
|
expression: Expression;
|
|
@@ -1611,6 +1639,8 @@ export interface TSTypeParameter extends BaseNode {
|
|
|
1611
1639
|
constraint: TSType | null;
|
|
1612
1640
|
default: TSType | null;
|
|
1613
1641
|
name: string;
|
|
1642
|
+
in: boolean | null;
|
|
1643
|
+
out: boolean | null;
|
|
1614
1644
|
}
|
|
1615
1645
|
|
|
1616
1646
|
/**
|
|
@@ -1633,8 +1663,8 @@ export type RestProperty = RestElement;
|
|
|
1633
1663
|
*/
|
|
1634
1664
|
export type SpreadProperty = SpreadElement;
|
|
1635
1665
|
|
|
1636
|
-
export type Standardized = ArrayExpression | AssignmentExpression | BinaryExpression | InterpreterDirective | Directive | DirectiveLiteral | BlockStatement | BreakStatement | CallExpression | CatchClause | ConditionalExpression | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | File | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | LabeledStatement | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | Program | ObjectExpression | ObjectMethod | ObjectProperty | RestElement | ReturnStatement | SequenceExpression | ParenthesizedExpression | SwitchCase | SwitchStatement | ThisExpression | ThrowStatement | TryStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | AssignmentPattern | ArrayPattern | ArrowFunctionExpression | ClassBody | ClassExpression | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ForOfStatement | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | MetaProperty | ClassMethod | ObjectPattern | SpreadElement | Super | TaggedTemplateExpression | TemplateElement | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | ExportNamespaceSpecifier | OptionalMemberExpression | OptionalCallExpression | ClassProperty | ClassPrivateProperty | ClassPrivateMethod | PrivateName | StaticBlock;
|
|
1637
|
-
export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | OptionalMemberExpression | OptionalCallExpression | TypeCastExpression | JSXElement | JSXFragment | BindExpression | DoExpression | RecordExpression | TupleExpression | DecimalLiteral | ModuleExpression | TopicReference | PipelineTopicExpression | PipelineBareFunction | PipelinePrimaryTopicReference | TSAsExpression | TSTypeAssertion | TSNonNullExpression;
|
|
1666
|
+
export type Standardized = ArrayExpression | AssignmentExpression | BinaryExpression | InterpreterDirective | Directive | DirectiveLiteral | BlockStatement | BreakStatement | CallExpression | CatchClause | ConditionalExpression | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | File | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | LabeledStatement | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | Program | ObjectExpression | ObjectMethod | ObjectProperty | RestElement | ReturnStatement | SequenceExpression | ParenthesizedExpression | SwitchCase | SwitchStatement | ThisExpression | ThrowStatement | TryStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | AssignmentPattern | ArrayPattern | ArrowFunctionExpression | ClassBody | ClassExpression | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ForOfStatement | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | MetaProperty | ClassMethod | ObjectPattern | SpreadElement | Super | TaggedTemplateExpression | TemplateElement | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | ExportNamespaceSpecifier | OptionalMemberExpression | OptionalCallExpression | ClassProperty | ClassAccessorProperty | ClassPrivateProperty | ClassPrivateMethod | PrivateName | StaticBlock;
|
|
1667
|
+
export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | OptionalMemberExpression | OptionalCallExpression | TypeCastExpression | JSXElement | JSXFragment | BindExpression | DoExpression | RecordExpression | TupleExpression | DecimalLiteral | ModuleExpression | TopicReference | PipelineTopicExpression | PipelineBareFunction | PipelinePrimaryTopicReference | TSInstantiationExpression | TSAsExpression | TSTypeAssertion | TSNonNullExpression;
|
|
1638
1668
|
export type Binary = BinaryExpression | LogicalExpression;
|
|
1639
1669
|
export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock;
|
|
1640
1670
|
export type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock;
|
|
@@ -1652,21 +1682,22 @@ export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod |
|
|
|
1652
1682
|
export type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod | StaticBlock;
|
|
1653
1683
|
export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral | DecimalLiteral;
|
|
1654
1684
|
export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration;
|
|
1655
|
-
export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern;
|
|
1656
|
-
export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty;
|
|
1685
|
+
export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSAsExpression | TSTypeAssertion | TSNonNullExpression;
|
|
1686
|
+
export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty | TSAsExpression | TSTypeAssertion | TSNonNullExpression;
|
|
1657
1687
|
export type TSEntityName = Identifier | TSQualifiedName;
|
|
1658
1688
|
export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral | DecimalLiteral;
|
|
1659
1689
|
export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | BigIntLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | DecimalLiteral;
|
|
1660
1690
|
export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty;
|
|
1661
1691
|
export type Method = ObjectMethod | ClassMethod | ClassPrivateMethod;
|
|
1662
1692
|
export type ObjectMember = ObjectMethod | ObjectProperty;
|
|
1663
|
-
export type Property = ObjectProperty | ClassProperty | ClassPrivateProperty;
|
|
1693
|
+
export type Property = ObjectProperty | ClassProperty | ClassAccessorProperty | ClassPrivateProperty;
|
|
1664
1694
|
export type UnaryLike = UnaryExpression | SpreadElement;
|
|
1665
1695
|
export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern;
|
|
1666
1696
|
export type Class = ClassExpression | ClassDeclaration;
|
|
1667
1697
|
export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration;
|
|
1668
1698
|
export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration;
|
|
1669
1699
|
export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportNamespaceSpecifier | ExportDefaultSpecifier;
|
|
1700
|
+
export type Accessor = ClassAccessorProperty;
|
|
1670
1701
|
export type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName;
|
|
1671
1702
|
export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation | EnumDeclaration | EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody | EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember | IndexedAccessType | OptionalIndexedAccessType;
|
|
1672
1703
|
export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation | IndexedAccessType | OptionalIndexedAccessType;
|
|
@@ -1677,7 +1708,7 @@ export type EnumBody = EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumS
|
|
|
1677
1708
|
export type EnumMember = EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember;
|
|
1678
1709
|
export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment;
|
|
1679
1710
|
export type Miscellaneous = Noop | Placeholder | V8IntrinsicIdentifier;
|
|
1680
|
-
export type TypeScript = TSParameterProperty | TSDeclareFunction | TSDeclareMethod | TSQualifiedName | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature | TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSNamedTupleMember | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSInterfaceDeclaration | TSInterfaceBody | TSTypeAliasDeclaration | TSAsExpression | TSTypeAssertion | TSEnumDeclaration | TSEnumMember | TSModuleDeclaration | TSModuleBlock | TSImportType | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | TSExportAssignment | TSNamespaceExportDeclaration | TSTypeAnnotation | TSTypeParameterInstantiation | TSTypeParameterDeclaration | TSTypeParameter;
|
|
1711
|
+
export type TypeScript = TSParameterProperty | TSDeclareFunction | TSDeclareMethod | TSQualifiedName | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature | TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSNamedTupleMember | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSInterfaceDeclaration | TSInterfaceBody | TSTypeAliasDeclaration | TSInstantiationExpression | TSAsExpression | TSTypeAssertion | TSEnumDeclaration | TSEnumMember | TSModuleDeclaration | TSModuleBlock | TSImportType | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | TSExportAssignment | TSNamespaceExportDeclaration | TSTypeAnnotation | TSTypeParameterInstantiation | TSTypeParameterDeclaration | TSTypeParameter;
|
|
1681
1712
|
export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature;
|
|
1682
1713
|
export type TSType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType;
|
|
1683
1714
|
export type TSBaseType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSLiteralType;
|
|
@@ -1717,6 +1748,7 @@ export interface Aliases {
|
|
|
1717
1748
|
ModuleDeclaration: ModuleDeclaration;
|
|
1718
1749
|
ExportDeclaration: ExportDeclaration;
|
|
1719
1750
|
ModuleSpecifier: ModuleSpecifier;
|
|
1751
|
+
Accessor: Accessor;
|
|
1720
1752
|
Private: Private;
|
|
1721
1753
|
Flow: Flow;
|
|
1722
1754
|
FlowType: FlowType;
|
|
@@ -1735,13 +1767,13 @@ export interface Aliases {
|
|
|
1735
1767
|
|
|
1736
1768
|
export function arrayExpression(elements?: Array<null | Expression | SpreadElement>): ArrayExpression;
|
|
1737
1769
|
export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression;
|
|
1738
|
-
export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression | PrivateName, right: Expression): BinaryExpression;
|
|
1770
|
+
export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=" | "|>", left: Expression | PrivateName, right: Expression): BinaryExpression;
|
|
1739
1771
|
export function interpreterDirective(value: string): InterpreterDirective;
|
|
1740
1772
|
export function directive(value: DirectiveLiteral): Directive;
|
|
1741
1773
|
export function directiveLiteral(value: string): DirectiveLiteral;
|
|
1742
1774
|
export function blockStatement(body: Array<Statement>, directives?: Array<Directive>): BlockStatement;
|
|
1743
1775
|
export function breakStatement(label?: Identifier | null): BreakStatement;
|
|
1744
|
-
export function callExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): CallExpression;
|
|
1776
|
+
export function callExpression(callee: Expression | Super | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): CallExpression;
|
|
1745
1777
|
export function catchClause(param: Identifier | ArrayPattern | ObjectPattern | null | undefined, body: BlockStatement): CatchClause;
|
|
1746
1778
|
export function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression;
|
|
1747
1779
|
export function continueStatement(label?: Identifier | null): ContinueStatement;
|
|
@@ -1763,12 +1795,12 @@ export function nullLiteral(): NullLiteral;
|
|
|
1763
1795
|
export function booleanLiteral(value: boolean): BooleanLiteral;
|
|
1764
1796
|
export function regExpLiteral(pattern: string, flags?: string): RegExpLiteral;
|
|
1765
1797
|
export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression;
|
|
1766
|
-
export function memberExpression(object: Expression, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: true | false | null): MemberExpression;
|
|
1767
|
-
export function newExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): NewExpression;
|
|
1798
|
+
export function memberExpression(object: Expression | Super, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: true | false | null): MemberExpression;
|
|
1799
|
+
export function newExpression(callee: Expression | Super | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): NewExpression;
|
|
1768
1800
|
export function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program;
|
|
1769
1801
|
export function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression;
|
|
1770
|
-
export function objectMethod(kind: "method" | "get" | "set" | undefined, key: Expression | Identifier | StringLiteral | NumericLiteral, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod;
|
|
1771
|
-
export function objectProperty(key: Expression | Identifier | StringLiteral | NumericLiteral, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<Decorator> | null): ObjectProperty;
|
|
1802
|
+
export function objectMethod(kind: "method" | "get" | "set" | undefined, key: Expression | Identifier | StringLiteral | NumericLiteral | BigIntLiteral, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod;
|
|
1803
|
+
export function objectProperty(key: Expression | Identifier | StringLiteral | NumericLiteral | BigIntLiteral | DecimalLiteral | PrivateName, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<Decorator> | null): ObjectProperty;
|
|
1772
1804
|
export function restElement(argument: LVal): RestElement;
|
|
1773
1805
|
export function returnStatement(argument?: Expression | null): ReturnStatement;
|
|
1774
1806
|
export function sequenceExpression(expressions: Array<Expression>): SequenceExpression;
|
|
@@ -1784,14 +1816,14 @@ export function variableDeclaration(kind: "var" | "let" | "const", declarations:
|
|
|
1784
1816
|
export function variableDeclarator(id: LVal, init?: Expression | null): VariableDeclarator;
|
|
1785
1817
|
export function whileStatement(test: Expression, body: Statement): WhileStatement;
|
|
1786
1818
|
export function withStatement(object: Expression, body: Statement): WithStatement;
|
|
1787
|
-
export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression, right: Expression): AssignmentPattern;
|
|
1788
|
-
export function arrayPattern(elements: Array<null | PatternLike>): ArrayPattern;
|
|
1819
|
+
export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression | TSAsExpression | TSTypeAssertion | TSNonNullExpression, right: Expression): AssignmentPattern;
|
|
1820
|
+
export function arrayPattern(elements: Array<null | PatternLike | LVal>): ArrayPattern;
|
|
1789
1821
|
export function arrowFunctionExpression(params: Array<Identifier | Pattern | RestElement>, body: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression;
|
|
1790
|
-
export function classBody(body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | TSDeclareMethod | TSIndexSignature>): ClassBody;
|
|
1822
|
+
export function classBody(body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>): ClassBody;
|
|
1791
1823
|
export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassExpression;
|
|
1792
1824
|
export function classDeclaration(id: Identifier, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassDeclaration;
|
|
1793
1825
|
export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration;
|
|
1794
|
-
export function exportDefaultDeclaration(declaration:
|
|
1826
|
+
export function exportDefaultDeclaration(declaration: TSDeclareFunction | FunctionDeclaration | ClassDeclaration | Expression): ExportDefaultDeclaration;
|
|
1795
1827
|
export function exportNamedDeclaration(declaration?: Declaration | null, specifiers?: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>, source?: StringLiteral | null): ExportNamedDeclaration;
|
|
1796
1828
|
export function exportSpecifier(local: Identifier, exported: Identifier | StringLiteral): ExportSpecifier;
|
|
1797
1829
|
export function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement;
|
|
@@ -1800,7 +1832,7 @@ export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifie
|
|
|
1800
1832
|
export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier;
|
|
1801
1833
|
export function importSpecifier(local: Identifier, imported: Identifier | StringLiteral): ImportSpecifier;
|
|
1802
1834
|
export function metaProperty(meta: Identifier, property: Identifier): MetaProperty;
|
|
1803
|
-
export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod;
|
|
1835
|
+
export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod;
|
|
1804
1836
|
export function objectPattern(properties: Array<RestElement | ObjectProperty>): ObjectPattern;
|
|
1805
1837
|
export function spreadElement(argument: Expression): SpreadElement;
|
|
1806
1838
|
declare function _super(): Super;
|
|
@@ -1816,9 +1848,10 @@ export function bigIntLiteral(value: string): BigIntLiteral;
|
|
|
1816
1848
|
export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier;
|
|
1817
1849
|
export function optionalMemberExpression(object: Expression, property: Expression | Identifier, computed: boolean | undefined, optional: boolean): OptionalMemberExpression;
|
|
1818
1850
|
export function optionalCallExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>, optional: boolean): OptionalCallExpression;
|
|
1819
|
-
export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassProperty;
|
|
1820
|
-
export function
|
|
1821
|
-
export function
|
|
1851
|
+
export function classProperty(key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassProperty;
|
|
1852
|
+
export function classAccessorProperty(key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression | PrivateName, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassAccessorProperty;
|
|
1853
|
+
export function classPrivateProperty(key: PrivateName, value?: Expression | null, decorators?: Array<Decorator> | null, _static?: boolean): ClassPrivateProperty;
|
|
1854
|
+
export function classPrivateMethod(kind: "get" | "set" | "method" | undefined, key: PrivateName, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, _static?: boolean): ClassPrivateMethod;
|
|
1822
1855
|
export function privateName(id: Identifier): PrivateName;
|
|
1823
1856
|
export function staticBlock(body: Array<Statement>): StaticBlock;
|
|
1824
1857
|
export function anyTypeAnnotation(): AnyTypeAnnotation;
|
|
@@ -1852,7 +1885,7 @@ export function emptyTypeAnnotation(): EmptyTypeAnnotation;
|
|
|
1852
1885
|
export function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation;
|
|
1853
1886
|
export function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation;
|
|
1854
1887
|
export function numberTypeAnnotation(): NumberTypeAnnotation;
|
|
1855
|
-
export function objectTypeAnnotation(properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>, indexers?: Array<ObjectTypeIndexer
|
|
1888
|
+
export function objectTypeAnnotation(properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>, indexers?: Array<ObjectTypeIndexer>, callProperties?: Array<ObjectTypeCallProperty>, internalSlots?: Array<ObjectTypeInternalSlot>, exact?: boolean): ObjectTypeAnnotation;
|
|
1856
1889
|
export function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot;
|
|
1857
1890
|
export function objectTypeCallProperty(value: FlowType): ObjectTypeCallProperty;
|
|
1858
1891
|
export function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null): ObjectTypeIndexer;
|
|
@@ -1920,7 +1953,7 @@ export function pipelineBareFunction(callee: Expression): PipelineBareFunction;
|
|
|
1920
1953
|
export function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference;
|
|
1921
1954
|
export function tsParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty;
|
|
1922
1955
|
export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareFunction;
|
|
1923
|
-
export function tsDeclareMethod(decorators: Array<Decorator> | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod;
|
|
1956
|
+
export function tsDeclareMethod(decorators: Array<Decorator> | null | undefined, key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod;
|
|
1924
1957
|
export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName;
|
|
1925
1958
|
export function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration;
|
|
1926
1959
|
export function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration;
|
|
@@ -1945,7 +1978,7 @@ export function tsFunctionType(typeParameters: TSTypeParameterDeclaration | null
|
|
|
1945
1978
|
export function tsConstructorType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructorType;
|
|
1946
1979
|
export function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference;
|
|
1947
1980
|
export function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation?: TSTypeAnnotation | null, asserts?: boolean | null): TSTypePredicate;
|
|
1948
|
-
export function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery;
|
|
1981
|
+
export function tsTypeQuery(exprName: TSEntityName | TSImportType, typeParameters?: TSTypeParameterInstantiation | null): TSTypeQuery;
|
|
1949
1982
|
export function tsTypeLiteral(members: Array<TSTypeElement>): TSTypeLiteral;
|
|
1950
1983
|
export function tsArrayType(elementType: TSType): TSArrayType;
|
|
1951
1984
|
export function tsTupleType(elementTypes: Array<TSType | TSNamedTupleMember>): TSTupleType;
|
|
@@ -1960,11 +1993,12 @@ export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType
|
|
|
1960
1993
|
export function tsTypeOperator(typeAnnotation: TSType): TSTypeOperator;
|
|
1961
1994
|
export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType;
|
|
1962
1995
|
export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, nameType?: TSType | null): TSMappedType;
|
|
1963
|
-
export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression): TSLiteralType;
|
|
1996
|
+
export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | TemplateLiteral | UnaryExpression): TSLiteralType;
|
|
1964
1997
|
export function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments;
|
|
1965
1998
|
export function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array<TSExpressionWithTypeArguments> | null | undefined, body: TSInterfaceBody): TSInterfaceDeclaration;
|
|
1966
1999
|
export function tsInterfaceBody(body: Array<TSTypeElement>): TSInterfaceBody;
|
|
1967
2000
|
export function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType): TSTypeAliasDeclaration;
|
|
2001
|
+
export function tsInstantiationExpression(expression: Expression, typeParameters?: TSTypeParameterInstantiation | null): TSInstantiationExpression;
|
|
1968
2002
|
export function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression;
|
|
1969
2003
|
export function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion;
|
|
1970
2004
|
export function tsEnumDeclaration(id: Identifier, members: Array<TSEnumMember>): TSEnumDeclaration;
|
|
@@ -1981,6 +2015,8 @@ export function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation;
|
|
|
1981
2015
|
export function tsTypeParameterInstantiation(params: Array<TSType>): TSTypeParameterInstantiation;
|
|
1982
2016
|
export function tsTypeParameterDeclaration(params: Array<TSTypeParameter>): TSTypeParameterDeclaration;
|
|
1983
2017
|
export function tsTypeParameter(constraint: TSType | null | undefined, _default: TSType | null | undefined, name: string): TSTypeParameter;
|
|
2018
|
+
export function isAccessor(node: object | null | undefined, opts?: object | null): node is Accessor;
|
|
2019
|
+
export function assertAccessor(node: object | null | undefined, opts?: object | null): void;
|
|
1984
2020
|
export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation;
|
|
1985
2021
|
export function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
|
|
1986
2022
|
export function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder;
|
|
@@ -2027,6 +2063,8 @@ export function isCatchClause(node: object | null | undefined, opts?: object | n
|
|
|
2027
2063
|
export function assertCatchClause(node: object | null | undefined, opts?: object | null): void;
|
|
2028
2064
|
export function isClass(node: object | null | undefined, opts?: object | null): node is Class;
|
|
2029
2065
|
export function assertClass(node: object | null | undefined, opts?: object | null): void;
|
|
2066
|
+
export function isClassAccessorProperty(node: object | null | undefined, opts?: object | null): node is ClassAccessorProperty;
|
|
2067
|
+
export function assertClassAccessorProperty(node: object | null | undefined, opts?: object | null): void;
|
|
2030
2068
|
export function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody;
|
|
2031
2069
|
export function assertClassBody(node: object | null | undefined, opts?: object | null): void;
|
|
2032
2070
|
export function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration;
|
|
@@ -2433,6 +2471,8 @@ export function isTSIndexedAccessType(node: object | null | undefined, opts?: ob
|
|
|
2433
2471
|
export function assertTSIndexedAccessType(node: object | null | undefined, opts?: object | null): void;
|
|
2434
2472
|
export function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType;
|
|
2435
2473
|
export function assertTSInferType(node: object | null | undefined, opts?: object | null): void;
|
|
2474
|
+
export function isTSInstantiationExpression(node: object | null | undefined, opts?: object | null): node is TSInstantiationExpression;
|
|
2475
|
+
export function assertTSInstantiationExpression(node: object | null | undefined, opts?: object | null): void;
|
|
2436
2476
|
export function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody;
|
|
2437
2477
|
export function assertTSInterfaceBody(node: object | null | undefined, opts?: object | null): void;
|
|
2438
2478
|
export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration;
|