Skip to content

Commit

Permalink
visitor: convert arguments descriptions to JSDoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed May 23, 2021
1 parent 4b1f920 commit c12f7b9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/language/visitor.js
Expand Up @@ -24,17 +24,19 @@ type EnterLeaveVisitor<TVisitedNode: ASTNode> = {
* during the visitor's traversal.
*/
export type ASTVisitFn<TVisitedNode: ASTNode> = (
// 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<ASTNode> | 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<string | number>,
// 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<ASTNode | $ReadOnlyArray<ASTNode>>,
) => any;

Expand Down

0 comments on commit c12f7b9

Please sign in to comment.