import { Equals } from "@tsplus/stdlib/structure/Equals"; import { Ord } from "@tsplus/stdlib/prelude/Ord/definition"; import { Collection } from "@tsplus/stdlib/collections/Collection/definition"; import { Maybe } from "@tsplus/stdlib/data/Maybe/definition"; import type { Node } from "@tsplus/stdlib/collections/RedBlackTree/node"; export declare const RedBlackTreeSym: unique symbol; export type RedBlackTreeSym = typeof RedBlackTreeSym; export declare const _K: unique symbol; export type _K = typeof _K; export declare const _V: unique symbol; export type _V = typeof _V; export type Direction = "Forward" | "Backward"; /** * A Red-Black Tree. * * @tsplus type RedBlackTree */ export interface RedBlackTree extends RedBlackTreeIterable, Equals { readonly [RedBlackTreeSym]: RedBlackTreeSym; readonly [_K]: () => K; readonly [_V]: () => V; readonly ord: Ord; readonly root: Node | undefined; [Symbol.iterator](): RedBlackTreeIterator; } /** * @tsplus type RedBlackTree.Ops */ export interface RedBlackTreeOps { $: RedBlackTreeAspects; } export declare const RedBlackTree: RedBlackTreeOps; /** * @tsplus type RedBlackTree.Aspects */ export interface RedBlackTreeAspects { } export interface RedBlackTreeIterable extends Collection { readonly ord: Ord; [Symbol.iterator](): RedBlackTreeIterator; } export declare class RedBlackTreeIterator implements Iterator { readonly self: RedBlackTree; readonly stack: Node[]; readonly direction: Direction; private count; constructor(self: RedBlackTree, stack: Node[], direction: Direction); /** * Clones the iterator */ clone(): RedBlackTreeIterator; /** * Reverse the traversal direction */ reversed(): RedBlackTreeIterator; /** * Iterator next */ next(): IteratorResult; /** * Returns the key */ get key(): Maybe; /** * Returns the value */ get value(): Maybe; /** * Returns the key */ get entry(): Maybe; /** * Returns the position of this iterator in the sorted list */ get index(): number; /** * Advances iterator to next element in list */ moveNext(): void; /** * Checks if there is a next element */ get hasNext(): boolean; /** * Advances iterator to previous element in list */ movePrev(): void; /** * Checks if there is a previous element */ get hasPrev(): boolean; } //# sourceMappingURL=definition.d.ts.map