whycq
2024-03-28 e17108966ccfcaee2bef8d981601c79c8716e304
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef {{
    skip: () => void;
    remove: () => void;
    replace: (node: BaseNode) => void;
}} WalkerContext */
export class WalkerBase {
    /** @type {boolean} */
    should_skip: boolean;
    /** @type {boolean} */
    should_remove: boolean;
    /** @type {BaseNode | null} */
    replacement: BaseNode | null;
    /** @type {WalkerContext} */
    context: WalkerContext;
    /**
     *
     * @param {any} parent
     * @param {string} prop
     * @param {number} index
     * @param {BaseNode} node
     */
    replace(parent: any, prop: string, index: number, node: import("estree").BaseNode): void;
    /**
     *
     * @param {any} parent
     * @param {string} prop
     * @param {number} index
     */
    remove(parent: any, prop: string, index: number): void;
}
export type BaseNode = import("estree").BaseNode;
export type WalkerContext = {
    skip: () => void;
    remove: () => void;
    replace: (node: import("estree").BaseNode) => void;
};