Skip to content
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

visitor: convert arguments descriptions to JSDoc comments #3123

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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