diff --git a/src/language/visitor.js b/src/language/visitor.js index c6d7d3c242..7b4d77a008 100644 --- a/src/language/visitor.js +++ b/src/language/visitor.js @@ -24,17 +24,19 @@ type EnterLeaveVisitor = { * during the visitor's traversal. */ export type ASTVisitFn = ( - // The current node being visiting. + /** The current node being visiting. */ node: TVisitedNode, - // The index or key to this node from the parent node or Array. + /** The index or key to this node from the parent node or Array. */ key: string | number | void, - // The parent immediately above this node, which may be an Array. + /** The parent immediately above this node, which may be an Array. */ parent: ASTNode | $ReadOnlyArray | void, - // The key path to get to this node from the root node. + /** The key path to get to this node from the root node. */ path: $ReadOnlyArray, - // All nodes and Arrays visited before reaching parent of this node. - // These correspond to array indices in `path`. - // Note: ancestors includes arrays which contain the parent of visited node. + /** + * All nodes and Arrays visited before reaching parent of this node. + * These correspond to array indices in `path`. + * Note: ancestors includes arrays which contain the parent of visited node. + */ ancestors: $ReadOnlyArray>, ) => any;