UNPKG

5.4 kBJavaScriptView Raw
1module.exports = {
2 AnyTypeAnnotation: [],
3 ArrayExpression: ['elements'],
4 ArrayPattern: ['elements', 'typeAnnotation'],
5 ArrayTypeAnnotation: ['elementType'],
6 ArrowFunctionExpression: ['params', 'body', 'returnType'],
7 AssignmentExpression: ['left', 'right'],
8 AssignmentPattern: ['left', 'right'],
9 AwaitExpression: ['argument'],
10 BinaryExpression: ['left', 'right'],
11 BindExpression: ['object', 'callee'],
12 BlockStatement: ['body'],
13 BooleanLiteralTypeAnnotation: [],
14 BooleanTypeAnnotation: [],
15 BreakStatement: ['label'],
16 CallExpression: ['callee', 'arguments'],
17 CatchClause: ['param', 'body'],
18 ClassBody: ['body'],
19 ClassDeclaration: ['id','body', 'superClass', 'typeParameters', 'superTypeParameters', 'implements', 'decorators'],
20 ClassExpression: ['id', 'body', 'superClass', 'typeParameters', 'superTypeParameters', 'implements', 'decorators'],
21 ClassImplements: ['id', 'typeParameters'],
22 ClassProperty: ['key', 'value', 'typeAnnotation', 'decorators'],
23 ComprehensionBlock: ['left', 'right'],
24 ComprehensionExpression: ['filter', 'blocks', 'body'],
25 ConditionalExpression: ['test', 'consequent', 'alternate'],
26 ContinueStatement: ['label'],
27 DebuggerStatement: [],
28 DeclareClass: ['id', 'typeParameters', 'extends', 'body'],
29 DeclareFunction: ['id'],
30 DeclareModule: ['id', 'body'],
31 DeclareVariable: ['id'],
32 Decorator: ['expression'],
33 DoExpression: ['body'],
34 DoWhileStatement: ['body', 'test'],
35 EmptyStatement: [],
36 ExportAllDeclaration: ['source', 'exported'],
37 ExportDefaultDeclaration: ['declaration'],
38 ExportDefaultSpecifier: ['exported'],
39 ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],
40 ExportNamespaceSpecifier: ['exported'],
41 ExportSpecifier: ['local', 'exported'],
42 ExpressionStatement: ['expression'],
43 File: ['program'],
44 ForInStatement: ['left', 'right', 'body'],
45 ForOfStatement: ['left', 'right', 'body'],
46 ForStatement: ['init', 'test', 'update', 'body'],
47 FunctionDeclaration: ['id', 'params', 'body', 'returnType', 'typeParameters'],
48 FunctionExpression: ['id', 'params', 'body', 'returnType', 'typeParameters'],
49 FunctionTypeAnnotation: ['typeParameters', 'params', 'rest', 'returnType'],
50 FunctionTypeParam: ['name', 'typeAnnotation'],
51 GenericTypeAnnotation: ['id', 'typeParameters'],
52 Identifier: ['typeAnnotation'],
53 IfStatement: ['test', 'consequent', 'alternate'],
54 ImportDeclaration: ['specifiers', 'source'],
55 ImportDefaultSpecifier: ['local'],
56 ImportNamespaceSpecifier: ['local'],
57 ImportSpecifier: ['local', 'imported'],
58 InterfaceDeclaration: ['id', 'typeParameters', 'extends', 'body'],
59 InterfaceExtends: ['id', 'typeParameters'],
60 IntersectionTypeAnnotation: ['types'],
61 JSXAttribute: ['name', 'value'],
62 JSXClosingElement: ['name'],
63 JSXElement: ['openingElement', 'closingElement', 'children'],
64 JSXEmptyExpression: [],
65 JSXExpressionContainer: ['expression'],
66 JSXIdentifier: [],
67 JSXMemberExpression: ['object', 'property'],
68 JSXNamespacedName: ['namespace', 'name'],
69 JSXOpeningElement: ['name', 'attributes'],
70 JSXSpreadAttribute: ['argument'],
71 LabeledStatement: ['label', 'body'],
72 Literal: [],
73 LogicalExpression: ['left', 'right'],
74 MemberExpression: ['object', 'property'],
75 MetaProperty: ['meta', 'property'],
76 MethodDefinition: ['key', 'value', 'decorators'],
77 MixedTypeAnnotation: [],
78 NewExpression: ['callee', 'arguments'],
79 Noop: [],
80 NullableTypeAnnotation: ['typeAnnotation'],
81 NumberLiteralTypeAnnotation: [],
82 NumberTypeAnnotation: [],
83 ObjectExpression: ['properties'],
84 ObjectPattern: ['properties', 'typeAnnotation'],
85 ObjectTypeAnnotation: ['properties', 'indexers', 'callProperties'],
86 ObjectTypeCallProperty: ['value'],
87 ObjectTypeIndexer: ['id', 'key', 'value'],
88 ObjectTypeProperty: ['key', 'value'],
89 ParenthesizedExpression: ['expression'],
90 Program: ['body'],
91 Property: ['key', 'value', 'decorators'],
92 QualifiedTypeIdentifier: ['id', 'qualification'],
93 RestElement: ['argument', 'typeAnnotation'],
94 ReturnStatement: ['argument'],
95 SequenceExpression: ['expressions'],
96 SpreadElement: ['argument'],
97 SpreadProperty: ['argument'],
98 StringLiteralTypeAnnotation: [],
99 StringTypeAnnotation: [],
100 Super: [],
101 SwitchCase: ['test', 'consequent'],
102 SwitchStatement: ['discriminant', 'cases'],
103 TaggedTemplateExpression: ['tag', 'quasi'],
104 TemplateElement: [],
105 TemplateLiteral: ['quasis', 'expressions'],
106 ThisExpression: [],
107 ThrowStatement: ['argument'],
108 TryStatement: ['block', 'handlers', 'handler', 'guardedHandlers', 'finalizer'],
109 TupleTypeAnnotation: ['types'],
110 TypeAlias: ['id', 'typeParameters', 'right'],
111 TypeAnnotation: ['typeAnnotation'],
112 TypeCastExpression: ['expression', 'typeAnnotation'],
113 TypeofTypeAnnotation: ['argument'],
114 TypeParameterDeclaration: ['params'],
115 TypeParameterInstantiation: ['params'],
116 UnaryExpression: ['argument'],
117 UnionTypeAnnotation: ['types'],
118 UpdateExpression: ['argument'],
119 VariableDeclaration: ['declarations'],
120 VariableDeclarator: ['id', 'init'],
121 VoidTypeAnnotation: [],
122 WhileStatement: ['test', 'body'],
123 WithStatement: ['object', 'body'],
124 YieldExpression: ['argument']
125};