11/**
22 * @typedef {import('unist').Node } Node
33 * @typedef {import('unist').Parent } Parent
4- * @typedef {import('unist-util-is').Type } Type
5- * @typedef {import('unist-util-is').Props } Props
6- * @typedef {import('unist-util-is').TestFunctionAnything } TestFunctionAnything
7- * @typedef {import('unist-util-visit-parents').Action } Action
8- * @typedef {import('unist-util-visit-parents').Index } Index
9- * @typedef {import('unist-util-visit-parents').ActionTuple } ActionTuple
4+ * @typedef {import('unist-util-is').Test } Test
5+ * @typedef {import('unist-util-visit-parents').VisitorResult } VisitorResult
106 */
117
128/**
2521 * @param {V } node Found node
2622 * @param {number|null } index Position of `node` in `parent`
2723 * @param {Parent|null } parent Parent of `node`
28- * @returns {null|undefined|Action|Index|ActionTuple|void }
24+ * @returns {VisitorResult }
2925 */
3026
3127import { visitParents , CONTINUE , SKIP , EXIT } from 'unist-util-visit-parents'
@@ -36,7 +32,7 @@ export const visit =
3632 /**
3733 * @type {(
3834 * (<T extends Node>(tree: Node, test: T['type']|Partial<T>|import('unist-util-is').TestFunctionPredicate<T>|Array.<T['type']|Partial<T>|import('unist-util-is').TestFunctionPredicate<T>>, visitor: Visitor<T>, reverse?: boolean) => void) &
39- * ((tree: Node, test: null|undefined|Type|Props|TestFunctionAnything|Array<Type|Props|TestFunctionAnything> , visitor: Visitor<Node>, reverse?: boolean) => void) &
35+ * ((tree: Node, test: Test , visitor: Visitor<Node>, reverse?: boolean) => void) &
4036 * ((tree: Node, visitor: Visitor<Node>, reverse?: boolean) => void)
4137 * )}
4238 */
@@ -45,7 +41,7 @@ export const visit =
4541 * Visit children of tree which pass a test
4642 *
4743 * @param {Node } tree Abstract syntax tree to walk
48- * @param {null|undefined|Type|Props|TestFunctionAnything|Array<Type|Props|TestFunctionAnything> } test test Test node
44+ * @param {Test } test test Test node
4945 * @param {Visitor<Node> } visitor Function to run for each node
5046 * @param {boolean } [reverse] Fisit the tree in reverse, defaults to false
5147 */
0 commit comments