ast-types 0.14.1 → 0.15.2
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/.github/workflows/main.yml +1 -1
- package/README.md +1 -1
- package/def/babel-core.js +48 -28
- package/def/babel.js +15 -2
- package/def/core.js +8 -26
- package/def/es-proposals.js +32 -4
- package/def/es2016.js +6 -12
- package/def/es2017.js +3 -3
- package/def/es2018.js +3 -3
- package/def/es2019.js +3 -3
- package/def/es2020.js +23 -12
- package/def/{es7.d.ts → es2021.d.ts} +0 -0
- package/def/es2021.js +13 -0
- package/def/es2022.d.ts +2 -0
- package/def/es2022.js +16 -0
- package/def/es6.js +3 -3
- package/def/esprima.js +4 -4
- package/def/flow.js +15 -4
- package/def/jsx.js +4 -4
- package/def/operators/core.d.ts +5 -0
- package/def/operators/core.js +25 -0
- package/def/operators/es2016.d.ts +5 -0
- package/def/operators/es2016.js +19 -0
- package/def/operators/es2020.d.ts +5 -0
- package/def/operators/es2020.js +15 -0
- package/def/operators/es2021.d.ts +5 -0
- package/def/operators/es2021.js +18 -0
- package/def/type-annotations.js +2 -2
- package/def/typescript.js +11 -4
- package/fork.d.ts +3 -2
- package/fork.js +7 -7
- package/gen/builders.d.ts +200 -100
- package/gen/kinds.d.ts +28 -15
- package/gen/namedTypes.d.ts +143 -49
- package/gen/visitor.d.ts +18 -5
- package/lib/equiv.js +1 -1
- package/lib/node-path.js +3 -3
- package/lib/path-visitor.js +2 -2
- package/lib/path.d.ts +3 -3
- package/lib/path.js +1 -1
- package/lib/scope.d.ts +3 -2
- package/lib/scope.js +63 -26
- package/lib/shared.js +1 -1
- package/lib/types.d.ts +1 -0
- package/lib/types.js +10 -6
- package/main.d.ts +1 -0
- package/main.js +9 -25
- package/package.json +15 -15
- package/types.d.ts +0 -1
- package/def/core-operators.d.ts +0 -3
- package/def/core-operators.js +0 -20
- package/def/es7.js +0 -34
package/gen/namedTypes.d.ts
CHANGED
|
@@ -196,11 +196,7 @@ export declare namespace namedTypes {
|
|
|
196
196
|
}
|
|
197
197
|
interface Literal extends Omit<Expression, "type"> {
|
|
198
198
|
type: "Literal";
|
|
199
|
-
value: string | boolean | null | number | RegExp;
|
|
200
|
-
regex?: {
|
|
201
|
-
pattern: string;
|
|
202
|
-
flags: string;
|
|
203
|
-
} | null;
|
|
199
|
+
value: string | boolean | null | number | RegExp | BigInt;
|
|
204
200
|
}
|
|
205
201
|
interface SequenceExpression extends Omit<Expression, "type"> {
|
|
206
202
|
type: "SequenceExpression";
|
|
@@ -220,11 +216,14 @@ export declare namespace namedTypes {
|
|
|
220
216
|
}
|
|
221
217
|
interface AssignmentExpression extends Omit<Expression, "type"> {
|
|
222
218
|
type: "AssignmentExpression";
|
|
223
|
-
operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=";
|
|
219
|
+
operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??=";
|
|
224
220
|
left: K.PatternKind | K.MemberExpressionKind;
|
|
225
221
|
right: K.ExpressionKind;
|
|
226
222
|
}
|
|
227
|
-
interface
|
|
223
|
+
interface ChainElement extends Node {
|
|
224
|
+
optional?: boolean;
|
|
225
|
+
}
|
|
226
|
+
interface MemberExpression extends Omit<Expression, "type">, Omit<ChainElement, "type"> {
|
|
228
227
|
type: "MemberExpression";
|
|
229
228
|
object: K.ExpressionKind;
|
|
230
229
|
property: K.IdentifierKind | K.ExpressionKind;
|
|
@@ -254,7 +253,7 @@ export declare namespace namedTypes {
|
|
|
254
253
|
arguments: (K.ExpressionKind | K.SpreadElementKind)[];
|
|
255
254
|
typeArguments?: null | K.TypeParameterInstantiationKind;
|
|
256
255
|
}
|
|
257
|
-
interface CallExpression extends Omit<Expression, "type"> {
|
|
256
|
+
interface CallExpression extends Omit<Expression, "type">, Omit<ChainElement, "type"> {
|
|
258
257
|
type: "CallExpression";
|
|
259
258
|
callee: K.ExpressionKind;
|
|
260
259
|
arguments: (K.ExpressionKind | K.SpreadElementKind)[];
|
|
@@ -416,12 +415,14 @@ export declare namespace namedTypes {
|
|
|
416
415
|
specifiers?: (K.ImportSpecifierKind | K.ImportNamespaceSpecifierKind | K.ImportDefaultSpecifierKind)[];
|
|
417
416
|
source: K.LiteralKind;
|
|
418
417
|
importKind?: "value" | "type" | "typeof";
|
|
418
|
+
assertions?: K.ImportAttributeKind[];
|
|
419
419
|
}
|
|
420
420
|
interface ExportNamedDeclaration extends Omit<Declaration, "type"> {
|
|
421
421
|
type: "ExportNamedDeclaration";
|
|
422
422
|
declaration: K.DeclarationKind | null;
|
|
423
423
|
specifiers?: K.ExportSpecifierKind[];
|
|
424
424
|
source?: K.LiteralKind | null;
|
|
425
|
+
assertions?: K.ImportAttributeKind[];
|
|
425
426
|
}
|
|
426
427
|
interface ExportSpecifier extends Omit<ModuleSpecifier, "type"> {
|
|
427
428
|
type: "ExportSpecifier";
|
|
@@ -435,6 +436,7 @@ export declare namespace namedTypes {
|
|
|
435
436
|
type: "ExportAllDeclaration";
|
|
436
437
|
source: K.LiteralKind;
|
|
437
438
|
exported: K.IdentifierKind | null;
|
|
439
|
+
assertions?: K.ImportAttributeKind[];
|
|
438
440
|
}
|
|
439
441
|
interface TaggedTemplateExpression extends Omit<Expression, "type"> {
|
|
440
442
|
type: "TaggedTemplateExpression";
|
|
@@ -444,7 +446,7 @@ export declare namespace namedTypes {
|
|
|
444
446
|
interface TemplateLiteral extends Omit<Expression, "type"> {
|
|
445
447
|
type: "TemplateLiteral";
|
|
446
448
|
quasis: K.TemplateElementKind[];
|
|
447
|
-
expressions: K.ExpressionKind[];
|
|
449
|
+
expressions: K.ExpressionKind[] | K.TSTypeKind[];
|
|
448
450
|
}
|
|
449
451
|
interface TemplateElement extends Omit<Node, "type"> {
|
|
450
452
|
type: "TemplateElement";
|
|
@@ -476,14 +478,64 @@ export declare namespace namedTypes {
|
|
|
476
478
|
type: "ImportExpression";
|
|
477
479
|
source: K.ExpressionKind;
|
|
478
480
|
}
|
|
479
|
-
interface
|
|
480
|
-
type: "
|
|
481
|
-
|
|
481
|
+
interface ChainExpression extends Omit<Expression, "type"> {
|
|
482
|
+
type: "ChainExpression";
|
|
483
|
+
expression: K.ChainElementKind;
|
|
482
484
|
}
|
|
483
|
-
interface OptionalCallExpression extends Omit<CallExpression, "type"> {
|
|
485
|
+
interface OptionalCallExpression extends Omit<CallExpression, "type" | "optional"> {
|
|
484
486
|
type: "OptionalCallExpression";
|
|
485
487
|
optional?: boolean;
|
|
486
488
|
}
|
|
489
|
+
interface OptionalMemberExpression extends Omit<MemberExpression, "type" | "optional"> {
|
|
490
|
+
type: "OptionalMemberExpression";
|
|
491
|
+
optional?: boolean;
|
|
492
|
+
}
|
|
493
|
+
interface StaticBlock extends Omit<Declaration, "type"> {
|
|
494
|
+
type: "StaticBlock";
|
|
495
|
+
body: K.StatementKind[];
|
|
496
|
+
}
|
|
497
|
+
interface Decorator extends Omit<Node, "type"> {
|
|
498
|
+
type: "Decorator";
|
|
499
|
+
expression: K.ExpressionKind;
|
|
500
|
+
}
|
|
501
|
+
interface PrivateName extends Omit<Expression, "type">, Omit<Pattern, "type"> {
|
|
502
|
+
type: "PrivateName";
|
|
503
|
+
id: K.IdentifierKind;
|
|
504
|
+
}
|
|
505
|
+
interface ClassPrivateProperty extends Omit<ClassProperty, "type" | "key" | "value"> {
|
|
506
|
+
type: "ClassPrivateProperty";
|
|
507
|
+
key: K.PrivateNameKind;
|
|
508
|
+
value?: K.ExpressionKind | null;
|
|
509
|
+
}
|
|
510
|
+
interface ImportAttribute extends Omit<Node, "type"> {
|
|
511
|
+
type: "ImportAttribute";
|
|
512
|
+
key: K.IdentifierKind | K.LiteralKind;
|
|
513
|
+
value: K.ExpressionKind;
|
|
514
|
+
}
|
|
515
|
+
interface RecordExpression extends Omit<Expression, "type"> {
|
|
516
|
+
type: "RecordExpression";
|
|
517
|
+
properties: (K.ObjectPropertyKind | K.ObjectMethodKind | K.SpreadElementKind)[];
|
|
518
|
+
}
|
|
519
|
+
interface ObjectMethod extends Omit<Node, "type">, Omit<Function, "type" | "params" | "body" | "generator" | "async"> {
|
|
520
|
+
type: "ObjectMethod";
|
|
521
|
+
kind: "method" | "get" | "set";
|
|
522
|
+
key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind;
|
|
523
|
+
params: K.PatternKind[];
|
|
524
|
+
body: K.BlockStatementKind;
|
|
525
|
+
computed?: boolean;
|
|
526
|
+
generator?: boolean;
|
|
527
|
+
async?: boolean;
|
|
528
|
+
accessibility?: K.LiteralKind | null;
|
|
529
|
+
decorators?: K.DecoratorKind[] | null;
|
|
530
|
+
}
|
|
531
|
+
interface TupleExpression extends Omit<Expression, "type"> {
|
|
532
|
+
type: "TupleExpression";
|
|
533
|
+
elements: (K.ExpressionKind | K.SpreadElementKind | null)[];
|
|
534
|
+
}
|
|
535
|
+
interface ModuleExpression extends Omit<Node, "type"> {
|
|
536
|
+
type: "ModuleExpression";
|
|
537
|
+
body: K.ProgramKind;
|
|
538
|
+
}
|
|
487
539
|
interface JSXAttribute extends Omit<Node, "type"> {
|
|
488
540
|
type: "JSXAttribute";
|
|
489
541
|
name: K.JSXIdentifierKind | K.JSXNamespacedNameKind;
|
|
@@ -555,19 +607,6 @@ export declare namespace namedTypes {
|
|
|
555
607
|
interface JSXClosingFragment extends Omit<Node, "type"> {
|
|
556
608
|
type: "JSXClosingFragment";
|
|
557
609
|
}
|
|
558
|
-
interface Decorator extends Omit<Node, "type"> {
|
|
559
|
-
type: "Decorator";
|
|
560
|
-
expression: K.ExpressionKind;
|
|
561
|
-
}
|
|
562
|
-
interface PrivateName extends Omit<Expression, "type">, Omit<Pattern, "type"> {
|
|
563
|
-
type: "PrivateName";
|
|
564
|
-
id: K.IdentifierKind;
|
|
565
|
-
}
|
|
566
|
-
interface ClassPrivateProperty extends Omit<ClassProperty, "type" | "key" | "value"> {
|
|
567
|
-
type: "ClassPrivateProperty";
|
|
568
|
-
key: K.PrivateNameKind;
|
|
569
|
-
value?: K.ExpressionKind | null;
|
|
570
|
-
}
|
|
571
610
|
interface TypeParameterDeclaration extends Omit<Node, "type"> {
|
|
572
611
|
type: "TypeParameterDeclaration";
|
|
573
612
|
params: K.TypeParameterKind[];
|
|
@@ -751,6 +790,17 @@ export declare namespace namedTypes {
|
|
|
751
790
|
object: K.IdentifierKind;
|
|
752
791
|
property: K.MemberTypeAnnotationKind | K.GenericTypeAnnotationKind;
|
|
753
792
|
}
|
|
793
|
+
interface IndexedAccessType extends Omit<FlowType, "type"> {
|
|
794
|
+
type: "IndexedAccessType";
|
|
795
|
+
objectType: K.FlowTypeKind;
|
|
796
|
+
indexType: K.FlowTypeKind;
|
|
797
|
+
}
|
|
798
|
+
interface OptionalIndexedAccessType extends Omit<FlowType, "type"> {
|
|
799
|
+
type: "OptionalIndexedAccessType";
|
|
800
|
+
objectType: K.FlowTypeKind;
|
|
801
|
+
indexType: K.FlowTypeKind;
|
|
802
|
+
optional: boolean;
|
|
803
|
+
}
|
|
754
804
|
interface UnionTypeAnnotation extends Omit<FlowType, "type"> {
|
|
755
805
|
type: "UnionTypeAnnotation";
|
|
756
806
|
types: K.FlowTypeKind[];
|
|
@@ -964,6 +1014,10 @@ export declare namespace namedTypes {
|
|
|
964
1014
|
interface StringLiteral extends Omit<Literal, "type" | "value"> {
|
|
965
1015
|
type: "StringLiteral";
|
|
966
1016
|
value: string;
|
|
1017
|
+
extra?: {
|
|
1018
|
+
rawValue: string;
|
|
1019
|
+
raw: string;
|
|
1020
|
+
};
|
|
967
1021
|
}
|
|
968
1022
|
interface NumericLiteral extends Omit<Literal, "type" | "value"> {
|
|
969
1023
|
type: "NumericLiteral";
|
|
@@ -982,6 +1036,14 @@ export declare namespace namedTypes {
|
|
|
982
1036
|
raw: string;
|
|
983
1037
|
};
|
|
984
1038
|
}
|
|
1039
|
+
interface DecimalLiteral extends Omit<Literal, "type" | "value"> {
|
|
1040
|
+
type: "DecimalLiteral";
|
|
1041
|
+
value: string;
|
|
1042
|
+
extra?: {
|
|
1043
|
+
rawValue: string;
|
|
1044
|
+
raw: string;
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
985
1047
|
interface NullLiteral extends Omit<Literal, "type" | "value"> {
|
|
986
1048
|
type: "NullLiteral";
|
|
987
1049
|
value?: null;
|
|
@@ -995,18 +1057,14 @@ export declare namespace namedTypes {
|
|
|
995
1057
|
pattern: string;
|
|
996
1058
|
flags: string;
|
|
997
1059
|
value?: RegExp;
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
generator?: boolean;
|
|
1007
|
-
async?: boolean;
|
|
1008
|
-
accessibility?: K.LiteralKind | null;
|
|
1009
|
-
decorators?: K.DecoratorKind[] | null;
|
|
1060
|
+
extra?: {
|
|
1061
|
+
rawValue: RegExp | undefined;
|
|
1062
|
+
raw: string;
|
|
1063
|
+
};
|
|
1064
|
+
regex?: {
|
|
1065
|
+
pattern: string;
|
|
1066
|
+
flags: string;
|
|
1067
|
+
};
|
|
1010
1068
|
}
|
|
1011
1069
|
interface ClassMethod extends Omit<Declaration, "type">, Omit<Function, "type" | "body"> {
|
|
1012
1070
|
type: "ClassMethod";
|
|
@@ -1047,6 +1105,13 @@ export declare namespace namedTypes {
|
|
|
1047
1105
|
interface Import extends Omit<Expression, "type"> {
|
|
1048
1106
|
type: "Import";
|
|
1049
1107
|
}
|
|
1108
|
+
interface V8IntrinsicIdentifier extends Omit<Expression, "type"> {
|
|
1109
|
+
type: "V8IntrinsicIdentifier";
|
|
1110
|
+
name: string;
|
|
1111
|
+
}
|
|
1112
|
+
interface TopicReference extends Omit<Expression, "type"> {
|
|
1113
|
+
type: "TopicReference";
|
|
1114
|
+
}
|
|
1050
1115
|
interface TSQualifiedName extends Omit<Node, "type"> {
|
|
1051
1116
|
type: "TSQualifiedName";
|
|
1052
1117
|
left: K.IdentifierKind | K.TSQualifiedNameKind;
|
|
@@ -1110,6 +1175,9 @@ export declare namespace namedTypes {
|
|
|
1110
1175
|
interface TSVoidKeyword extends Omit<TSType, "type"> {
|
|
1111
1176
|
type: "TSVoidKeyword";
|
|
1112
1177
|
}
|
|
1178
|
+
interface TSIntrinsicKeyword extends Omit<TSType, "type"> {
|
|
1179
|
+
type: "TSIntrinsicKeyword";
|
|
1180
|
+
}
|
|
1113
1181
|
interface TSThisType extends Omit<TSType, "type"> {
|
|
1114
1182
|
type: "TSThisType";
|
|
1115
1183
|
}
|
|
@@ -1338,7 +1406,7 @@ export declare namespace namedTypes {
|
|
|
1338
1406
|
readonly?: boolean;
|
|
1339
1407
|
parameter: K.IdentifierKind | K.AssignmentPatternKind;
|
|
1340
1408
|
}
|
|
1341
|
-
type ASTNode = File | Program | Identifier | BlockStatement | EmptyStatement | ExpressionStatement | IfStatement | LabeledStatement | BreakStatement | ContinueStatement | WithStatement | SwitchStatement | SwitchCase | ReturnStatement | ThrowStatement | TryStatement | CatchClause | WhileStatement | DoWhileStatement | ForStatement | VariableDeclaration | ForInStatement | DebuggerStatement | FunctionDeclaration | FunctionExpression | VariableDeclarator | ThisExpression | ArrayExpression | ObjectExpression | Property | Literal | SequenceExpression | UnaryExpression | BinaryExpression | AssignmentExpression | MemberExpression | UpdateExpression | LogicalExpression | ConditionalExpression | NewExpression | CallExpression | RestElement | TypeAnnotation | TSTypeAnnotation | SpreadElementPattern | ArrowFunctionExpression | ForOfStatement | YieldExpression | GeneratorExpression | ComprehensionBlock | ComprehensionExpression | ObjectProperty | PropertyPattern | ObjectPattern | ArrayPattern | SpreadElement | AssignmentPattern | MethodDefinition | ClassPropertyDefinition | ClassProperty | ClassBody | ClassDeclaration | ClassExpression | Super | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportDeclaration | ExportNamedDeclaration | ExportSpecifier | ExportDefaultDeclaration | ExportAllDeclaration | TaggedTemplateExpression | TemplateLiteral | TemplateElement | MetaProperty | AwaitExpression | SpreadProperty | SpreadPropertyPattern | ImportExpression |
|
|
1409
|
+
type ASTNode = File | Program | Identifier | BlockStatement | EmptyStatement | ExpressionStatement | IfStatement | LabeledStatement | BreakStatement | ContinueStatement | WithStatement | SwitchStatement | SwitchCase | ReturnStatement | ThrowStatement | TryStatement | CatchClause | WhileStatement | DoWhileStatement | ForStatement | VariableDeclaration | ForInStatement | DebuggerStatement | FunctionDeclaration | FunctionExpression | VariableDeclarator | ThisExpression | ArrayExpression | ObjectExpression | Property | Literal | SequenceExpression | UnaryExpression | BinaryExpression | AssignmentExpression | MemberExpression | UpdateExpression | LogicalExpression | ConditionalExpression | NewExpression | CallExpression | RestElement | TypeAnnotation | TSTypeAnnotation | SpreadElementPattern | ArrowFunctionExpression | ForOfStatement | YieldExpression | GeneratorExpression | ComprehensionBlock | ComprehensionExpression | ObjectProperty | PropertyPattern | ObjectPattern | ArrayPattern | SpreadElement | AssignmentPattern | MethodDefinition | ClassPropertyDefinition | ClassProperty | ClassBody | ClassDeclaration | ClassExpression | Super | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportDeclaration | ExportNamedDeclaration | ExportSpecifier | ExportDefaultDeclaration | ExportAllDeclaration | TaggedTemplateExpression | TemplateLiteral | TemplateElement | MetaProperty | AwaitExpression | SpreadProperty | SpreadPropertyPattern | ImportExpression | ChainExpression | OptionalCallExpression | OptionalMemberExpression | StaticBlock | Decorator | PrivateName | ClassPrivateProperty | ImportAttribute | RecordExpression | ObjectMethod | TupleExpression | ModuleExpression | JSXAttribute | JSXIdentifier | JSXNamespacedName | JSXExpressionContainer | JSXElement | JSXFragment | JSXMemberExpression | JSXSpreadAttribute | JSXEmptyExpression | JSXText | JSXSpreadChild | JSXOpeningElement | JSXClosingElement | JSXOpeningFragment | JSXClosingFragment | TypeParameterDeclaration | TSTypeParameterDeclaration | TypeParameterInstantiation | TSTypeParameterInstantiation | ClassImplements | TSExpressionWithTypeArguments | AnyTypeAnnotation | EmptyTypeAnnotation | MixedTypeAnnotation | VoidTypeAnnotation | SymbolTypeAnnotation | NumberTypeAnnotation | BigIntTypeAnnotation | NumberLiteralTypeAnnotation | NumericLiteralTypeAnnotation | BigIntLiteralTypeAnnotation | StringTypeAnnotation | StringLiteralTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullableTypeAnnotation | NullLiteralTypeAnnotation | NullTypeAnnotation | ThisTypeAnnotation | ExistsTypeAnnotation | ExistentialTypeParam | FunctionTypeAnnotation | FunctionTypeParam | ArrayTypeAnnotation | ObjectTypeAnnotation | ObjectTypeProperty | ObjectTypeSpreadProperty | ObjectTypeIndexer | ObjectTypeCallProperty | ObjectTypeInternalSlot | Variance | QualifiedTypeIdentifier | GenericTypeAnnotation | MemberTypeAnnotation | IndexedAccessType | OptionalIndexedAccessType | UnionTypeAnnotation | IntersectionTypeAnnotation | TypeofTypeAnnotation | TypeParameter | InterfaceTypeAnnotation | InterfaceExtends | InterfaceDeclaration | DeclareInterface | TypeAlias | DeclareTypeAlias | OpaqueType | DeclareOpaqueType | TypeCastExpression | TupleTypeAnnotation | DeclareVariable | DeclareFunction | DeclareClass | DeclareModule | DeclareModuleExports | DeclareExportDeclaration | ExportBatchSpecifier | DeclareExportAllDeclaration | InferredPredicate | DeclaredPredicate | EnumDeclaration | EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody | EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember | ExportDeclaration | Block | Line | Noop | DoExpression | BindExpression | ParenthesizedExpression | ExportNamespaceSpecifier | ExportDefaultSpecifier | CommentBlock | CommentLine | Directive | DirectiveLiteral | InterpreterDirective | StringLiteral | NumericLiteral | BigIntLiteral | DecimalLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ClassMethod | ClassPrivateMethod | RestProperty | ForAwaitStatement | Import | V8IntrinsicIdentifier | TopicReference | TSQualifiedName | TSTypeReference | TSAsExpression | TSNonNullExpression | TSAnyKeyword | TSBigIntKeyword | TSBooleanKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSIntrinsicKeyword | TSThisType | TSArrayType | TSLiteralType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSTypeParameter | TSParenthesizedType | TSFunctionType | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSMappedType | TSTupleType | TSNamedTupleMember | TSRestType | TSOptionalType | TSIndexedAccessType | TSTypeOperator | TSIndexSignature | TSPropertySignature | TSMethodSignature | TSTypePredicate | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSEnumMember | TSTypeQuery | TSImportType | TSTypeLiteral | TSTypeAssertion | TSEnumDeclaration | TSTypeAliasDeclaration | TSModuleBlock | TSModuleDeclaration | TSImportEqualsDeclaration | TSExternalModuleReference | TSExportAssignment | TSNamespaceExportDeclaration | TSInterfaceBody | TSInterfaceDeclaration | TSParameterProperty;
|
|
1342
1410
|
let Printable: Type<Printable>;
|
|
1343
1411
|
let SourceLocation: Type<SourceLocation>;
|
|
1344
1412
|
let Node: Type<Node>;
|
|
@@ -1384,6 +1452,7 @@ export declare namespace namedTypes {
|
|
|
1384
1452
|
let UnaryExpression: Type<UnaryExpression>;
|
|
1385
1453
|
let BinaryExpression: Type<BinaryExpression>;
|
|
1386
1454
|
let AssignmentExpression: Type<AssignmentExpression>;
|
|
1455
|
+
let ChainElement: Type<ChainElement>;
|
|
1387
1456
|
let MemberExpression: Type<MemberExpression>;
|
|
1388
1457
|
let UpdateExpression: Type<UpdateExpression>;
|
|
1389
1458
|
let LogicalExpression: Type<LogicalExpression>;
|
|
@@ -1431,8 +1500,18 @@ export declare namespace namedTypes {
|
|
|
1431
1500
|
let SpreadProperty: Type<SpreadProperty>;
|
|
1432
1501
|
let SpreadPropertyPattern: Type<SpreadPropertyPattern>;
|
|
1433
1502
|
let ImportExpression: Type<ImportExpression>;
|
|
1434
|
-
let
|
|
1503
|
+
let ChainExpression: Type<ChainExpression>;
|
|
1435
1504
|
let OptionalCallExpression: Type<OptionalCallExpression>;
|
|
1505
|
+
let OptionalMemberExpression: Type<OptionalMemberExpression>;
|
|
1506
|
+
let StaticBlock: Type<StaticBlock>;
|
|
1507
|
+
let Decorator: Type<Decorator>;
|
|
1508
|
+
let PrivateName: Type<PrivateName>;
|
|
1509
|
+
let ClassPrivateProperty: Type<ClassPrivateProperty>;
|
|
1510
|
+
let ImportAttribute: Type<ImportAttribute>;
|
|
1511
|
+
let RecordExpression: Type<RecordExpression>;
|
|
1512
|
+
let ObjectMethod: Type<ObjectMethod>;
|
|
1513
|
+
let TupleExpression: Type<TupleExpression>;
|
|
1514
|
+
let ModuleExpression: Type<ModuleExpression>;
|
|
1436
1515
|
let JSXAttribute: Type<JSXAttribute>;
|
|
1437
1516
|
let JSXIdentifier: Type<JSXIdentifier>;
|
|
1438
1517
|
let JSXNamespacedName: Type<JSXNamespacedName>;
|
|
@@ -1448,9 +1527,6 @@ export declare namespace namedTypes {
|
|
|
1448
1527
|
let JSXClosingElement: Type<JSXClosingElement>;
|
|
1449
1528
|
let JSXOpeningFragment: Type<JSXOpeningFragment>;
|
|
1450
1529
|
let JSXClosingFragment: Type<JSXClosingFragment>;
|
|
1451
|
-
let Decorator: Type<Decorator>;
|
|
1452
|
-
let PrivateName: Type<PrivateName>;
|
|
1453
|
-
let ClassPrivateProperty: Type<ClassPrivateProperty>;
|
|
1454
1530
|
let TypeParameterDeclaration: Type<TypeParameterDeclaration>;
|
|
1455
1531
|
let TSTypeParameterDeclaration: Type<TSTypeParameterDeclaration>;
|
|
1456
1532
|
let TypeParameterInstantiation: Type<TypeParameterInstantiation>;
|
|
@@ -1494,6 +1570,8 @@ export declare namespace namedTypes {
|
|
|
1494
1570
|
let QualifiedTypeIdentifier: Type<QualifiedTypeIdentifier>;
|
|
1495
1571
|
let GenericTypeAnnotation: Type<GenericTypeAnnotation>;
|
|
1496
1572
|
let MemberTypeAnnotation: Type<MemberTypeAnnotation>;
|
|
1573
|
+
let IndexedAccessType: Type<IndexedAccessType>;
|
|
1574
|
+
let OptionalIndexedAccessType: Type<OptionalIndexedAccessType>;
|
|
1497
1575
|
let UnionTypeAnnotation: Type<UnionTypeAnnotation>;
|
|
1498
1576
|
let IntersectionTypeAnnotation: Type<IntersectionTypeAnnotation>;
|
|
1499
1577
|
let TypeofTypeAnnotation: Type<TypeofTypeAnnotation>;
|
|
@@ -1545,15 +1623,17 @@ export declare namespace namedTypes {
|
|
|
1545
1623
|
let StringLiteral: Type<StringLiteral>;
|
|
1546
1624
|
let NumericLiteral: Type<NumericLiteral>;
|
|
1547
1625
|
let BigIntLiteral: Type<BigIntLiteral>;
|
|
1626
|
+
let DecimalLiteral: Type<DecimalLiteral>;
|
|
1548
1627
|
let NullLiteral: Type<NullLiteral>;
|
|
1549
1628
|
let BooleanLiteral: Type<BooleanLiteral>;
|
|
1550
1629
|
let RegExpLiteral: Type<RegExpLiteral>;
|
|
1551
|
-
let ObjectMethod: Type<ObjectMethod>;
|
|
1552
1630
|
let ClassMethod: Type<ClassMethod>;
|
|
1553
1631
|
let ClassPrivateMethod: Type<ClassPrivateMethod>;
|
|
1554
1632
|
let RestProperty: Type<RestProperty>;
|
|
1555
1633
|
let ForAwaitStatement: Type<ForAwaitStatement>;
|
|
1556
1634
|
let Import: Type<Import>;
|
|
1635
|
+
let V8IntrinsicIdentifier: Type<V8IntrinsicIdentifier>;
|
|
1636
|
+
let TopicReference: Type<TopicReference>;
|
|
1557
1637
|
let TSQualifiedName: Type<TSQualifiedName>;
|
|
1558
1638
|
let TSTypeReference: Type<TSTypeReference>;
|
|
1559
1639
|
let TSHasOptionalTypeParameters: Type<TSHasOptionalTypeParameters>;
|
|
@@ -1572,6 +1652,7 @@ export declare namespace namedTypes {
|
|
|
1572
1652
|
let TSUndefinedKeyword: Type<TSUndefinedKeyword>;
|
|
1573
1653
|
let TSUnknownKeyword: Type<TSUnknownKeyword>;
|
|
1574
1654
|
let TSVoidKeyword: Type<TSVoidKeyword>;
|
|
1655
|
+
let TSIntrinsicKeyword: Type<TSIntrinsicKeyword>;
|
|
1575
1656
|
let TSThisType: Type<TSThisType>;
|
|
1576
1657
|
let TSArrayType: Type<TSArrayType>;
|
|
1577
1658
|
let TSLiteralType: Type<TSLiteralType>;
|
|
@@ -1661,6 +1742,7 @@ export interface NamedTypes {
|
|
|
1661
1742
|
UnaryExpression: Type<namedTypes.UnaryExpression>;
|
|
1662
1743
|
BinaryExpression: Type<namedTypes.BinaryExpression>;
|
|
1663
1744
|
AssignmentExpression: Type<namedTypes.AssignmentExpression>;
|
|
1745
|
+
ChainElement: Type<namedTypes.ChainElement>;
|
|
1664
1746
|
MemberExpression: Type<namedTypes.MemberExpression>;
|
|
1665
1747
|
UpdateExpression: Type<namedTypes.UpdateExpression>;
|
|
1666
1748
|
LogicalExpression: Type<namedTypes.LogicalExpression>;
|
|
@@ -1708,8 +1790,18 @@ export interface NamedTypes {
|
|
|
1708
1790
|
SpreadProperty: Type<namedTypes.SpreadProperty>;
|
|
1709
1791
|
SpreadPropertyPattern: Type<namedTypes.SpreadPropertyPattern>;
|
|
1710
1792
|
ImportExpression: Type<namedTypes.ImportExpression>;
|
|
1711
|
-
|
|
1793
|
+
ChainExpression: Type<namedTypes.ChainExpression>;
|
|
1712
1794
|
OptionalCallExpression: Type<namedTypes.OptionalCallExpression>;
|
|
1795
|
+
OptionalMemberExpression: Type<namedTypes.OptionalMemberExpression>;
|
|
1796
|
+
StaticBlock: Type<namedTypes.StaticBlock>;
|
|
1797
|
+
Decorator: Type<namedTypes.Decorator>;
|
|
1798
|
+
PrivateName: Type<namedTypes.PrivateName>;
|
|
1799
|
+
ClassPrivateProperty: Type<namedTypes.ClassPrivateProperty>;
|
|
1800
|
+
ImportAttribute: Type<namedTypes.ImportAttribute>;
|
|
1801
|
+
RecordExpression: Type<namedTypes.RecordExpression>;
|
|
1802
|
+
ObjectMethod: Type<namedTypes.ObjectMethod>;
|
|
1803
|
+
TupleExpression: Type<namedTypes.TupleExpression>;
|
|
1804
|
+
ModuleExpression: Type<namedTypes.ModuleExpression>;
|
|
1713
1805
|
JSXAttribute: Type<namedTypes.JSXAttribute>;
|
|
1714
1806
|
JSXIdentifier: Type<namedTypes.JSXIdentifier>;
|
|
1715
1807
|
JSXNamespacedName: Type<namedTypes.JSXNamespacedName>;
|
|
@@ -1725,9 +1817,6 @@ export interface NamedTypes {
|
|
|
1725
1817
|
JSXClosingElement: Type<namedTypes.JSXClosingElement>;
|
|
1726
1818
|
JSXOpeningFragment: Type<namedTypes.JSXOpeningFragment>;
|
|
1727
1819
|
JSXClosingFragment: Type<namedTypes.JSXClosingFragment>;
|
|
1728
|
-
Decorator: Type<namedTypes.Decorator>;
|
|
1729
|
-
PrivateName: Type<namedTypes.PrivateName>;
|
|
1730
|
-
ClassPrivateProperty: Type<namedTypes.ClassPrivateProperty>;
|
|
1731
1820
|
TypeParameterDeclaration: Type<namedTypes.TypeParameterDeclaration>;
|
|
1732
1821
|
TSTypeParameterDeclaration: Type<namedTypes.TSTypeParameterDeclaration>;
|
|
1733
1822
|
TypeParameterInstantiation: Type<namedTypes.TypeParameterInstantiation>;
|
|
@@ -1771,6 +1860,8 @@ export interface NamedTypes {
|
|
|
1771
1860
|
QualifiedTypeIdentifier: Type<namedTypes.QualifiedTypeIdentifier>;
|
|
1772
1861
|
GenericTypeAnnotation: Type<namedTypes.GenericTypeAnnotation>;
|
|
1773
1862
|
MemberTypeAnnotation: Type<namedTypes.MemberTypeAnnotation>;
|
|
1863
|
+
IndexedAccessType: Type<namedTypes.IndexedAccessType>;
|
|
1864
|
+
OptionalIndexedAccessType: Type<namedTypes.OptionalIndexedAccessType>;
|
|
1774
1865
|
UnionTypeAnnotation: Type<namedTypes.UnionTypeAnnotation>;
|
|
1775
1866
|
IntersectionTypeAnnotation: Type<namedTypes.IntersectionTypeAnnotation>;
|
|
1776
1867
|
TypeofTypeAnnotation: Type<namedTypes.TypeofTypeAnnotation>;
|
|
@@ -1822,15 +1913,17 @@ export interface NamedTypes {
|
|
|
1822
1913
|
StringLiteral: Type<namedTypes.StringLiteral>;
|
|
1823
1914
|
NumericLiteral: Type<namedTypes.NumericLiteral>;
|
|
1824
1915
|
BigIntLiteral: Type<namedTypes.BigIntLiteral>;
|
|
1916
|
+
DecimalLiteral: Type<namedTypes.DecimalLiteral>;
|
|
1825
1917
|
NullLiteral: Type<namedTypes.NullLiteral>;
|
|
1826
1918
|
BooleanLiteral: Type<namedTypes.BooleanLiteral>;
|
|
1827
1919
|
RegExpLiteral: Type<namedTypes.RegExpLiteral>;
|
|
1828
|
-
ObjectMethod: Type<namedTypes.ObjectMethod>;
|
|
1829
1920
|
ClassMethod: Type<namedTypes.ClassMethod>;
|
|
1830
1921
|
ClassPrivateMethod: Type<namedTypes.ClassPrivateMethod>;
|
|
1831
1922
|
RestProperty: Type<namedTypes.RestProperty>;
|
|
1832
1923
|
ForAwaitStatement: Type<namedTypes.ForAwaitStatement>;
|
|
1833
1924
|
Import: Type<namedTypes.Import>;
|
|
1925
|
+
V8IntrinsicIdentifier: Type<namedTypes.V8IntrinsicIdentifier>;
|
|
1926
|
+
TopicReference: Type<namedTypes.TopicReference>;
|
|
1834
1927
|
TSQualifiedName: Type<namedTypes.TSQualifiedName>;
|
|
1835
1928
|
TSTypeReference: Type<namedTypes.TSTypeReference>;
|
|
1836
1929
|
TSHasOptionalTypeParameters: Type<namedTypes.TSHasOptionalTypeParameters>;
|
|
@@ -1849,6 +1942,7 @@ export interface NamedTypes {
|
|
|
1849
1942
|
TSUndefinedKeyword: Type<namedTypes.TSUndefinedKeyword>;
|
|
1850
1943
|
TSUnknownKeyword: Type<namedTypes.TSUnknownKeyword>;
|
|
1851
1944
|
TSVoidKeyword: Type<namedTypes.TSVoidKeyword>;
|
|
1945
|
+
TSIntrinsicKeyword: Type<namedTypes.TSIntrinsicKeyword>;
|
|
1852
1946
|
TSThisType: Type<namedTypes.TSThisType>;
|
|
1853
1947
|
TSArrayType: Type<namedTypes.TSArrayType>;
|
|
1854
1948
|
TSLiteralType: Type<namedTypes.TSLiteralType>;
|
package/gen/visitor.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export interface Visitor<M = {}> {
|
|
|
47
47
|
visitUnaryExpression?(this: Context & M, path: NodePath<namedTypes.UnaryExpression>): any;
|
|
48
48
|
visitBinaryExpression?(this: Context & M, path: NodePath<namedTypes.BinaryExpression>): any;
|
|
49
49
|
visitAssignmentExpression?(this: Context & M, path: NodePath<namedTypes.AssignmentExpression>): any;
|
|
50
|
+
visitChainElement?(this: Context & M, path: NodePath<namedTypes.ChainElement>): any;
|
|
50
51
|
visitMemberExpression?(this: Context & M, path: NodePath<namedTypes.MemberExpression>): any;
|
|
51
52
|
visitUpdateExpression?(this: Context & M, path: NodePath<namedTypes.UpdateExpression>): any;
|
|
52
53
|
visitLogicalExpression?(this: Context & M, path: NodePath<namedTypes.LogicalExpression>): any;
|
|
@@ -94,8 +95,18 @@ export interface Visitor<M = {}> {
|
|
|
94
95
|
visitSpreadProperty?(this: Context & M, path: NodePath<namedTypes.SpreadProperty>): any;
|
|
95
96
|
visitSpreadPropertyPattern?(this: Context & M, path: NodePath<namedTypes.SpreadPropertyPattern>): any;
|
|
96
97
|
visitImportExpression?(this: Context & M, path: NodePath<namedTypes.ImportExpression>): any;
|
|
97
|
-
|
|
98
|
+
visitChainExpression?(this: Context & M, path: NodePath<namedTypes.ChainExpression>): any;
|
|
98
99
|
visitOptionalCallExpression?(this: Context & M, path: NodePath<namedTypes.OptionalCallExpression>): any;
|
|
100
|
+
visitOptionalMemberExpression?(this: Context & M, path: NodePath<namedTypes.OptionalMemberExpression>): any;
|
|
101
|
+
visitStaticBlock?(this: Context & M, path: NodePath<namedTypes.StaticBlock>): any;
|
|
102
|
+
visitDecorator?(this: Context & M, path: NodePath<namedTypes.Decorator>): any;
|
|
103
|
+
visitPrivateName?(this: Context & M, path: NodePath<namedTypes.PrivateName>): any;
|
|
104
|
+
visitClassPrivateProperty?(this: Context & M, path: NodePath<namedTypes.ClassPrivateProperty>): any;
|
|
105
|
+
visitImportAttribute?(this: Context & M, path: NodePath<namedTypes.ImportAttribute>): any;
|
|
106
|
+
visitRecordExpression?(this: Context & M, path: NodePath<namedTypes.RecordExpression>): any;
|
|
107
|
+
visitObjectMethod?(this: Context & M, path: NodePath<namedTypes.ObjectMethod>): any;
|
|
108
|
+
visitTupleExpression?(this: Context & M, path: NodePath<namedTypes.TupleExpression>): any;
|
|
109
|
+
visitModuleExpression?(this: Context & M, path: NodePath<namedTypes.ModuleExpression>): any;
|
|
99
110
|
visitJSXAttribute?(this: Context & M, path: NodePath<namedTypes.JSXAttribute>): any;
|
|
100
111
|
visitJSXIdentifier?(this: Context & M, path: NodePath<namedTypes.JSXIdentifier>): any;
|
|
101
112
|
visitJSXNamespacedName?(this: Context & M, path: NodePath<namedTypes.JSXNamespacedName>): any;
|
|
@@ -111,9 +122,6 @@ export interface Visitor<M = {}> {
|
|
|
111
122
|
visitJSXClosingElement?(this: Context & M, path: NodePath<namedTypes.JSXClosingElement>): any;
|
|
112
123
|
visitJSXOpeningFragment?(this: Context & M, path: NodePath<namedTypes.JSXOpeningFragment>): any;
|
|
113
124
|
visitJSXClosingFragment?(this: Context & M, path: NodePath<namedTypes.JSXClosingFragment>): any;
|
|
114
|
-
visitDecorator?(this: Context & M, path: NodePath<namedTypes.Decorator>): any;
|
|
115
|
-
visitPrivateName?(this: Context & M, path: NodePath<namedTypes.PrivateName>): any;
|
|
116
|
-
visitClassPrivateProperty?(this: Context & M, path: NodePath<namedTypes.ClassPrivateProperty>): any;
|
|
117
125
|
visitTypeParameterDeclaration?(this: Context & M, path: NodePath<namedTypes.TypeParameterDeclaration>): any;
|
|
118
126
|
visitTSTypeParameterDeclaration?(this: Context & M, path: NodePath<namedTypes.TSTypeParameterDeclaration>): any;
|
|
119
127
|
visitTypeParameterInstantiation?(this: Context & M, path: NodePath<namedTypes.TypeParameterInstantiation>): any;
|
|
@@ -157,6 +165,8 @@ export interface Visitor<M = {}> {
|
|
|
157
165
|
visitQualifiedTypeIdentifier?(this: Context & M, path: NodePath<namedTypes.QualifiedTypeIdentifier>): any;
|
|
158
166
|
visitGenericTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.GenericTypeAnnotation>): any;
|
|
159
167
|
visitMemberTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.MemberTypeAnnotation>): any;
|
|
168
|
+
visitIndexedAccessType?(this: Context & M, path: NodePath<namedTypes.IndexedAccessType>): any;
|
|
169
|
+
visitOptionalIndexedAccessType?(this: Context & M, path: NodePath<namedTypes.OptionalIndexedAccessType>): any;
|
|
160
170
|
visitUnionTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.UnionTypeAnnotation>): any;
|
|
161
171
|
visitIntersectionTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.IntersectionTypeAnnotation>): any;
|
|
162
172
|
visitTypeofTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.TypeofTypeAnnotation>): any;
|
|
@@ -208,15 +218,17 @@ export interface Visitor<M = {}> {
|
|
|
208
218
|
visitStringLiteral?(this: Context & M, path: NodePath<namedTypes.StringLiteral>): any;
|
|
209
219
|
visitNumericLiteral?(this: Context & M, path: NodePath<namedTypes.NumericLiteral>): any;
|
|
210
220
|
visitBigIntLiteral?(this: Context & M, path: NodePath<namedTypes.BigIntLiteral>): any;
|
|
221
|
+
visitDecimalLiteral?(this: Context & M, path: NodePath<namedTypes.DecimalLiteral>): any;
|
|
211
222
|
visitNullLiteral?(this: Context & M, path: NodePath<namedTypes.NullLiteral>): any;
|
|
212
223
|
visitBooleanLiteral?(this: Context & M, path: NodePath<namedTypes.BooleanLiteral>): any;
|
|
213
224
|
visitRegExpLiteral?(this: Context & M, path: NodePath<namedTypes.RegExpLiteral>): any;
|
|
214
|
-
visitObjectMethod?(this: Context & M, path: NodePath<namedTypes.ObjectMethod>): any;
|
|
215
225
|
visitClassMethod?(this: Context & M, path: NodePath<namedTypes.ClassMethod>): any;
|
|
216
226
|
visitClassPrivateMethod?(this: Context & M, path: NodePath<namedTypes.ClassPrivateMethod>): any;
|
|
217
227
|
visitRestProperty?(this: Context & M, path: NodePath<namedTypes.RestProperty>): any;
|
|
218
228
|
visitForAwaitStatement?(this: Context & M, path: NodePath<namedTypes.ForAwaitStatement>): any;
|
|
219
229
|
visitImport?(this: Context & M, path: NodePath<namedTypes.Import>): any;
|
|
230
|
+
visitV8IntrinsicIdentifier?(this: Context & M, path: NodePath<namedTypes.V8IntrinsicIdentifier>): any;
|
|
231
|
+
visitTopicReference?(this: Context & M, path: NodePath<namedTypes.TopicReference>): any;
|
|
220
232
|
visitTSQualifiedName?(this: Context & M, path: NodePath<namedTypes.TSQualifiedName>): any;
|
|
221
233
|
visitTSTypeReference?(this: Context & M, path: NodePath<namedTypes.TSTypeReference>): any;
|
|
222
234
|
visitTSHasOptionalTypeParameters?(this: Context & M, path: NodePath<namedTypes.TSHasOptionalTypeParameters>): any;
|
|
@@ -235,6 +247,7 @@ export interface Visitor<M = {}> {
|
|
|
235
247
|
visitTSUndefinedKeyword?(this: Context & M, path: NodePath<namedTypes.TSUndefinedKeyword>): any;
|
|
236
248
|
visitTSUnknownKeyword?(this: Context & M, path: NodePath<namedTypes.TSUnknownKeyword>): any;
|
|
237
249
|
visitTSVoidKeyword?(this: Context & M, path: NodePath<namedTypes.TSVoidKeyword>): any;
|
|
250
|
+
visitTSIntrinsicKeyword?(this: Context & M, path: NodePath<namedTypes.TSIntrinsicKeyword>): any;
|
|
238
251
|
visitTSThisType?(this: Context & M, path: NodePath<namedTypes.TSThisType>): any;
|
|
239
252
|
visitTSArrayType?(this: Context & M, path: NodePath<namedTypes.TSArrayType>): any;
|
|
240
253
|
visitTSLiteralType?(this: Context & M, path: NodePath<namedTypes.TSLiteralType>): any;
|
package/lib/equiv.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
5
|
function default_1(fork) {
|
|
6
6
|
var types = fork.use(types_1.default);
|
|
7
7
|
var getFieldNames = types.getFieldNames;
|
package/lib/node-path.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
5
|
-
var path_1 = tslib_1.__importDefault(require("./path"));
|
|
6
|
-
var scope_1 = tslib_1.__importDefault(require("./scope"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
|
+
var path_1 = (0, tslib_1.__importDefault)(require("./path"));
|
|
6
|
+
var scope_1 = (0, tslib_1.__importDefault)(require("./scope"));
|
|
7
7
|
function nodePathPlugin(fork) {
|
|
8
8
|
var types = fork.use(types_1.default);
|
|
9
9
|
var n = types.namedTypes;
|
package/lib/path-visitor.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
5
|
-
var node_path_1 = tslib_1.__importDefault(require("./node-path"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
|
+
var node_path_1 = (0, tslib_1.__importDefault)(require("./node-path"));
|
|
6
6
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
7
7
|
function pathVisitorPlugin(fork) {
|
|
8
8
|
var types = fork.use(types_1.default);
|
package/lib/path.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export interface Path<V = any> {
|
|
|
7
7
|
__childCache: object | null;
|
|
8
8
|
getValueProperty(name: any): any;
|
|
9
9
|
get(...names: any[]): any;
|
|
10
|
-
each(callback: any, context
|
|
11
|
-
map(callback: any, context
|
|
12
|
-
filter(callback: any, context
|
|
10
|
+
each(callback: any, context?: any): any;
|
|
11
|
+
map(callback: any, context?: any): any;
|
|
12
|
+
filter(callback: any, context?: any): any;
|
|
13
13
|
shift(): any;
|
|
14
14
|
unshift(...args: any[]): any;
|
|
15
15
|
push(...args: any[]): any;
|
package/lib/path.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
5
|
var Op = Object.prototype;
|
|
6
6
|
var hasOwn = Op.hasOwnProperty;
|
|
7
7
|
function pathPlugin(fork) {
|
package/lib/scope.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fork } from "../types";
|
|
2
|
+
import { NodePath } from "./node-path";
|
|
2
3
|
export interface Scope {
|
|
3
|
-
path:
|
|
4
|
+
path: NodePath;
|
|
4
5
|
node: any;
|
|
5
6
|
isGlobal: boolean;
|
|
6
7
|
depth: number;
|
|
@@ -20,7 +21,7 @@ export interface Scope {
|
|
|
20
21
|
getGlobalScope(): Scope;
|
|
21
22
|
}
|
|
22
23
|
export interface ScopeConstructor {
|
|
23
|
-
new (path:
|
|
24
|
+
new (path: NodePath, parentScope: any): Scope;
|
|
24
25
|
isEstablishedBy(node: any): any;
|
|
25
26
|
}
|
|
26
27
|
export default function scopePlugin(fork: Fork): ScopeConstructor;
|