|
| 1 | +/** |
| 2 | + * @fileoverview The visitor keys for the new and updated node types |
| 3 | + * @author Michał Sajnóg <https://github.com/michalsnik> |
| 4 | + * MIT License |
| 5 | + */ |
| 6 | + |
| 7 | +"use strict"; |
| 8 | + |
| 9 | +const Evk = require("eslint-visitor-keys"); |
| 10 | + |
| 11 | +module.exports = Evk.unionWith({ |
| 12 | + ArrayPattern: ["typeAnnotation"], |
| 13 | + ArrowFunctionExpression: ["returnType", "typeParameters"], |
| 14 | + AssignmentPattern: ["typeAnnotation"], |
| 15 | + CallExpression: ["typeParameters"], |
| 16 | + ClassDeclaration: ["superTypeParameters", "typeParameters"], |
| 17 | + ClassExpression: ["superTypeParameters", "typeParameters"], |
| 18 | + ClassImplements: ["typeParameters"], |
| 19 | + ClassProperty: ["typeAnnotation"], |
| 20 | + FunctionDeclaration: ["returnType"], |
| 21 | + FunctionExpression: ["returnType", "typeParameters"], |
| 22 | + Identifier: ["typeAnnotation"], |
| 23 | + InterfaceDeclaration: ["typeParameters"], |
| 24 | + NewExpression: ["typeParameters"], |
| 25 | + ObjectPattern: ["typeAnnotation"], |
| 26 | + RestElement: ["typeAnnotation"], |
| 27 | + TaggedTemplateExpression: ["typeParameters"], |
| 28 | + VariableDeclarator: ["typeParameters"], |
| 29 | + |
| 30 | + TSAbstractClassProperty: ["typeAnnotation", "key", "value"], |
| 31 | + TSAbstractKeyword: [], |
| 32 | + TSAbstractMethodDefinition: ["key", "value"], |
| 33 | + TSAnyKeyword: [], |
| 34 | + TSArrayType: [], |
| 35 | + TSAsyncKeyword: [], |
| 36 | + TSBooleanKeyword: [], |
| 37 | + TSConstructorType: ["typeAnnotation"], |
| 38 | + TSConstructSignature: ["typeAnnotation", "typeParameters"], |
| 39 | + TSDeclareKeyword: [], |
| 40 | + TSEnumDeclaration: ["members"], |
| 41 | + TSEnumMember: ["initializer"], |
| 42 | + TSExportAssignment: ["expression"], |
| 43 | + TSExportKeyword: [], |
| 44 | + TSImportType: ["parameter", "qualifier", "typeParameters"], |
| 45 | + TSLiteralType: [], |
| 46 | + TSIndexSignature: ["typeAnnotation", "index"], |
| 47 | + TSInterfaceBody: ["body"], |
| 48 | + TSInterfaceDeclaration: ["body", "id", "heritage"], |
| 49 | + TSInterfaceHeritage: ["id", "typeParameters"], |
| 50 | + TSFunctionType: ["typeAnnotation"], |
| 51 | + TSMethodSignature: ["typeAnnotation", "typeParameters", "key", "params"], |
| 52 | + TSModuleBlock: ["body"], |
| 53 | + TSModuleDeclaration: ["id", "body"], |
| 54 | + TSNamespaceFunctionDeclaration: [], |
| 55 | + TSNonNullExpression: [], |
| 56 | + TSNeverKeyword: [], |
| 57 | + TSNullKeyword: [], |
| 58 | + TSNumberKeyword: [], |
| 59 | + TSObjectKeyword: [], |
| 60 | + TSParameterProperty: ["parameter"], |
| 61 | + TSPrivateKeyword: [], |
| 62 | + TSPropertySignature: ["typeAnnotation", "key", "initializer"], |
| 63 | + TSProtectedKeyword: [], |
| 64 | + TSPublicKeyword: [], |
| 65 | + TSQualifiedName: ["left", "right"], |
| 66 | + TSQuestionToken: [], |
| 67 | + TSReadonlyKeyword: [], |
| 68 | + TSStaticKeyword: [], |
| 69 | + TSStringKeyword: [], |
| 70 | + TSSymbolKeyword: [], |
| 71 | + TSTypeAnnotation: ["typeAnnotation"], |
| 72 | + TSTypeLiteral: [], |
| 73 | + TSTypeOperator: ["typeAnnotation"], |
| 74 | + TSTypeParameter: ["constraint", "default"], |
| 75 | + TSTypeParameterDeclaration: ["params"], |
| 76 | + TSTypeParameterInstantiation: ["params"], |
| 77 | + TSTypePredicate: ["typeAnnotation", "parameterName"], |
| 78 | + TSTypeReference: ["typeName", "typeParameters"], |
| 79 | + TSUnionType: [], |
| 80 | + TSUndefinedKeyword: [], |
| 81 | + TSVoidKeyword: [] |
| 82 | +}); |
0 commit comments