import type { DeleterAction } from "./types"; interface PruneTreeOptions { /** * @param node the node to check * @returns **false** if the node SHOULD be deleted */ predicate: (node: NODE, parents: readonly PARENT[]) => boolean; getChildren: (node: PARENT) => readonly NODE[]; /** * @param parent the parent node * @param child the child that should be deleted * @returns the pointer to the child node, or **null** if the child cannot be deleted */ deleter: (parent: PARENT | undefined, child: NODE) => DeleterAction; /** * If there are circular references, we can use this function to get a unique identifier for the node. * * @param node * @returns the unique identifier for the node * @default node => node as unknown as POINTER (the reference itself is used as the identifier) */ getPointer?: (node: NODE) => POINTER; } export declare function prunetree(root: ROOT, opts: PruneTreeOptions): [result: ROOT | undefined, deleted: ReadonlySet]; export {}; //# sourceMappingURL=prunetree.d.ts.map