import { Optional } from '@cosmicmind/foundationjs'; export type Stackable = { parent?: Stackable; }; export declare const StackCompareFn: (a: T, b: T) => number; export declare const stackNodeCreate: (props?: Omit) => T; export type Stack = { top?: T; count: number; }; export declare const stackCreate: () => Stack; export declare function stackPeek(stack: Stack): Optional; export declare function stackPush(stack: Stack, node: T): void; export declare function stackPop(stack: Stack): Optional; export declare function stackIterator(stack: Stack): IterableIterator; export declare function stackIterateFrom(node: T): IterableIterator; export declare function stackIterateToParent(node: T): IterableIterator; export declare function stackClear(stack: Stack): void; export declare function stackDepth(node: T): number; export declare function stackIsTop(stack: Stack, node: T, compare?: (a: T, b: T) => number): boolean; export declare function stackHas(stack: Stack, node: T, compare?: (a: T, b: T) => number): boolean; export declare function stackQuery(stack: Stack, ...fn: ((node: T) => boolean)[]): Set; //# sourceMappingURL=Stack.d.ts.map