This repository has been archived by the owner on Jan 19, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 75
/
visitor-keys.js
105 lines (101 loc) · 4.48 KB
/
visitor-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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/**
* @fileoverview The visitor keys for the new and updated node types
* @author Michał Sajnóg <https://github.com/michalsnik>
* MIT License
*/
"use strict";
const Evk = require("eslint-visitor-keys");
module.exports = Evk.unionWith({
// Additional Properties.
ArrayPattern: ["elements", "typeAnnotation"],
ArrowFunctionExpression: ["typeParameters", "params", "returnType", "body"],
ClassDeclaration: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "implements", "body"],
ClassExpression: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "implements", "body"],
FunctionDeclaration: ["id", "typeParameters", "params", "returnType", "body"],
FunctionExpression: ["id", "typeParameters", "params", "returnType", "body"],
Identifier: ["decorators", "typeAnnotation"],
MethodDefinition: ["decorators", "key", "value"],
ObjectPattern: ["properties", "typeAnnotation"],
RestElement: ["argument", "typeAnnotation"],
NewExpression: ["callee", "typeParameters", "arguments"],
CallExpression: ["callee", "typeParameters", "arguments"],
// Additional Nodes.
BigIntLiteral: [],
ClassProperty: ["decorators", "key", "typeAnnotation", "value"],
Decorator: ["expression"],
TSAbstractClassProperty: ["decorators", "key", "typeAnnotation", "value"],
TSAbstractClassDeclaration: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "implements", "body"],
TSAbstractKeyword: [],
TSAbstractMethodDefinition: ["key", "value"],
TSAnyKeyword: [],
TSArrayType: ["elementType"],
TSAsExpression: ["expression", "typeAnnotation"],
TSAsyncKeyword: [],
TSBigIntKeyword: [],
TSBooleanKeyword: [],
TSCallSignatureDeclaration: ["typeParameters", "params", "returnType"],
TSClassImplements: ["expression", "typeParameters"],
TSConditionalType: ["checkType", "extendsType", "trueType", "falseType"],
TSConstructSignatureDeclaration: ["typeParameters", "params", "returnType"],
TSConstructorType: ["typeParameters", "params", "returnType"],
TSDeclareFunction: ["id", "typeParameters", "params", "returnType"],
TSDeclareKeyword: [],
TSEmptyBodyFunctionExpression: ["id", "typeParameters", "params", "returnType"],
TSEnumDeclaration: ["members"],
TSEnumMember: ["id", "initializer"],
TSExportAssignment: ["expression"],
TSExportKeyword: [],
TSExternalModuleReference: ["expression"],
TSImportType: ["parameter", "qualifier", "typeParameters"],
TSInferType: ["typeParameter"],
TSLiteralType: ["literal"],
TSIntersectionType: ["types"],
TSIndexedAccessType: ["indexType", "objectType"],
TSIndexSignature: ["typeAnnotation", "parameters"],
TSInterfaceBody: ["body"],
TSInterfaceDeclaration: ["id", "typeParameters", "extends", "body"],
TSInterfaceHeritage: ["expression", "typeParameters"],
TSImportEqualsDeclaration: ["id", "moduleReference"],
TSFunctionType: ["typeParameters", "params", "returnType"],
TSMappedType: ["typeParameter"],
TSMethodSignature: ["typeParameters", "key", "params", "returnType"],
TSModuleBlock: ["body"],
TSModuleDeclaration: ["id", "body"],
TSNamespaceExportDeclaration: ["id"],
TSNonNullExpression: ["expression"],
TSNeverKeyword: [],
TSNullKeyword: [],
TSNumberKeyword: [],
TSObjectKeyword: [],
TSOptionalType: ["typeAnnotation"],
TSParameterProperty: ["parameter"],
TSParenthesizedType: ["typeAnnotation"],
TSPrivateKeyword: [],
TSPropertySignature: ["typeAnnotation", "key", "initializer"],
TSProtectedKeyword: [],
TSPublicKeyword: [],
TSQualifiedName: ["left", "right"],
TSQuestionToken: [],
TSReadonlyKeyword: [],
TSRestType: ["typeAnnotation"],
TSStaticKeyword: [],
TSStringKeyword: [],
TSSymbolKeyword: [],
TSThisType: [],
TSTupleType: ["elementTypes"],
TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"],
TSTypeAnnotation: ["typeAnnotation"],
TSTypeAssertion: ["typeAnnotation", "expression"],
TSTypeLiteral: ["members"],
TSTypeOperator: ["typeAnnotation"],
TSTypeParameter: ["name", "constraint", "default"],
TSTypeParameterDeclaration: ["params"],
TSTypeParameterInstantiation: ["params"],
TSTypePredicate: ["typeAnnotation", "parameterName"],
TSTypeReference: ["typeName", "typeParameters"],
TSTypeQuery: ["exprName"],
TSUnionType: ["types"],
TSUndefinedKeyword: [],
TSUnknownKeyword: [],
TSVoidKeyword: []
});