diff --git a/package-lock.json b/package-lock.json index 5d18ec86a8..a86feadf71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2298,7 +2298,6 @@ "dependencies": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -4504,7 +4503,6 @@ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.6", "universalify": "^2.0.0" }, "optionalDependencies": { diff --git a/src/index.d.ts b/src/index.d.ts index 0776078b8b..104436ddce 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -230,6 +230,7 @@ export { Visitor, VisitFn, VisitorKeyMap, + ASTVisitorKeyMap, // AST nodes ASTNode, ASTKindToNode, diff --git a/src/language/index.d.ts b/src/language/index.d.ts index ce965383fe..8de93211eb 100644 --- a/src/language/index.d.ts +++ b/src/language/index.d.ts @@ -17,6 +17,7 @@ export { Visitor, VisitFn, VisitorKeyMap, + ASTVisitorKeyMap, } from './visitor'; export { diff --git a/src/language/visitor.d.ts b/src/language/visitor.d.ts index 22e634663c..ca0a81f6a7 100644 --- a/src/language/visitor.d.ts +++ b/src/language/visitor.d.ts @@ -49,9 +49,18 @@ export type VisitFn<TAnyNode, TVisitedNode = TAnyNode> = ( /** * A KeyMap describes each the traversable properties of each kind of node. + * + * @deprecated Please using ASTVisitorKeyMap instead */ export type VisitorKeyMap<T> = { [P in keyof T]: ReadonlyArray<keyof T[P]> }; +/** + * A KeyMap describes each the traversable properties of each kind of node. + */ +export type ASTVisitorKeyMap = { + [P in keyof ASTKindToNode]?: ReadonlyArray<keyof ASTKindToNode[P]>; +}; + // TODO: Should be `[]`, but that requires TypeScript@3 type EmptyTuple = Array<never>;