forked from RReverser/estraverse-fb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeys.js
49 lines (48 loc) · 1.69 KB
/
keys.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
module.exports = {
XJSIdentifier: [],
XJSNamespacedName: ['namespace', 'name'],
XJSMemberExpression: ['object', 'property'],
XJSEmptyExpression: [],
XJSExpressionContainer: ['expression'],
XJSElement: ['openingElement', 'closingElement', 'children'],
XJSClosingElement: ['name'],
XJSOpeningElement: ['name', 'attributes'],
XJSAttribute: ['name', 'value'],
XJSText: null,
XJSSpreadAttribute: ['argument'],
/* Flow Type Annotations */
Type: [],
AnyTypeAnnotation: [],
VoidTypeAnnotation: [],
NumberTypeAnnotation: [],
StringTypeAnnotation: [],
StringLiteralTypeAnnotation: ["value", "raw"],
BooleanTypeAnnotation: [],
TypeAnnotation: ["typeAnnotation"],
NullableTypeAnnotation: ["typeAnnotation"],
FunctionTypeAnnotation: ["params", "returnType", "rest", "typeParameters"],
FunctionTypeParam: ["name", "typeAnnotation", "optional"],
ObjectTypeAnnotation: ["properties"],
ObjectTypeProperty: ["key", "value", "optional"],
ObjectTypeIndexer: ["id", "key", "value"],
ObjectTypeCallProperty: ["value"],
QualifiedTypeIdentifier: ["qualification", "id"],
GenericTypeAnnotation: ["id", "typeParameters"],
MemberTypeAnnotation: ["object", "property"],
UnionTypeAnnotation: ["types"],
IntersectionTypeAnnotation: ["types"],
TypeofTypeAnnotation: ["argument"],
TypeParameterDeclaration: ["params"],
TypeParameterInstantiation: ["params"],
ClassProperty: ["key", "typeAnnotation"],
ClassImplements: [],
InterfaceDeclaration: ["id", "body", "extends"],
InterfaceExtends: ["id"],
TypeAlias: ["id", "typeParameters", "right"],
TupleTypeAnnotation: ["types"],
DeclareVariable: ["id"],
DeclareFunction: ["id"],
DeclareClass: ["id"],
DeclareModule: ["id", "body"]
/* End: Flow Type Annotations */
};