Skip to content

visitor: convert arguments descriptions to JSDoc comments #3123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/language/visitor.js
Original file line number Diff line number Diff line change
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