@@ -17,32 +17,37 @@ module.exports = Evk.unionWith({
17
17
ClassExpression : [ "superTypeParameters" , "typeParameters" ] ,
18
18
ClassImplements : [ "typeParameters" ] ,
19
19
ClassProperty : [ "typeAnnotation" ] ,
20
- FunctionDeclaration : [ "returnType" ] ,
20
+ FunctionDeclaration : [ "returnType" , "typeParameters" ] ,
21
21
FunctionExpression : [ "returnType" , "typeParameters" ] ,
22
22
Identifier : [ "typeAnnotation" ] ,
23
23
InterfaceDeclaration : [ "typeParameters" ] ,
24
24
NewExpression : [ "typeParameters" ] ,
25
25
ObjectPattern : [ "typeAnnotation" ] ,
26
- RestElement : [ "typeAnnotation" ] ,
26
+ /**
27
+ * According to https://github.com/estree/estree/blob/master/extensions/type-annotations.md
28
+ * RestElement should have "typeAnnotation", but has not. Annotation is added on the "parameter" node
29
+ */
30
+ RestElement : [ ] ,
27
31
TaggedTemplateExpression : [ "typeParameters" ] ,
28
32
VariableDeclarator : [ "typeParameters" ] ,
29
33
30
34
TSAbstractClassProperty : [ "typeAnnotation" , "key" , "value" ] ,
35
+ TSAbstractClassDeclaration : [ "id" , "body" , "superClass" , "implements" ] ,
31
36
TSAbstractKeyword : [ ] ,
32
37
TSAbstractMethodDefinition : [ "key" , "value" ] ,
33
38
TSAnyKeyword : [ ] ,
34
- TSArrayType : [ ] ,
39
+ TSArrayType : [ "elementType" ] ,
35
40
TSAsyncKeyword : [ ] ,
36
41
TSBooleanKeyword : [ ] ,
37
- TSConstructorType : [ "typeAnnotation" ] ,
42
+ TSConstructorType : [ "typeAnnotation" , "parameters" ] ,
38
43
TSConstructSignature : [ "typeAnnotation" , "typeParameters" ] ,
39
44
TSDeclareKeyword : [ ] ,
40
45
TSEnumDeclaration : [ "members" ] ,
41
46
TSEnumMember : [ "initializer" ] ,
42
47
TSExportAssignment : [ "expression" ] ,
43
48
TSExportKeyword : [ ] ,
44
49
TSImportType : [ "parameter" , "qualifier" , "typeParameters" ] ,
45
- TSLiteralType : [ ] ,
50
+ TSLiteralType : [ "literal" ] ,
46
51
TSIndexSignature : [ "typeAnnotation" , "index" ] ,
47
52
TSInterfaceBody : [ "body" ] ,
48
53
TSInterfaceDeclaration : [ "body" , "id" , "heritage" ] ,
@@ -52,7 +57,7 @@ module.exports = Evk.unionWith({
52
57
TSModuleBlock : [ "body" ] ,
53
58
TSModuleDeclaration : [ "id" , "body" ] ,
54
59
TSNamespaceFunctionDeclaration : [ ] ,
55
- TSNonNullExpression : [ ] ,
60
+ TSNonNullExpression : [ "expression" ] ,
56
61
TSNeverKeyword : [ ] ,
57
62
TSNullKeyword : [ ] ,
58
63
TSNumberKeyword : [ ] ,
@@ -69,14 +74,14 @@ module.exports = Evk.unionWith({
69
74
TSStringKeyword : [ ] ,
70
75
TSSymbolKeyword : [ ] ,
71
76
TSTypeAnnotation : [ "typeAnnotation" ] ,
72
- TSTypeLiteral : [ ] ,
77
+ TSTypeLiteral : [ "members" ] ,
73
78
TSTypeOperator : [ "typeAnnotation" ] ,
74
79
TSTypeParameter : [ "constraint" , "default" ] ,
75
80
TSTypeParameterDeclaration : [ "params" ] ,
76
81
TSTypeParameterInstantiation : [ "params" ] ,
77
82
TSTypePredicate : [ "typeAnnotation" , "parameterName" ] ,
78
83
TSTypeReference : [ "typeName" , "typeParameters" ] ,
79
- TSUnionType : [ ] ,
84
+ TSUnionType : [ "types" ] ,
80
85
TSUndefinedKeyword : [ ] ,
81
86
TSVoidKeyword : [ ]
82
87
} ) ;
0 commit comments