import { BTNKey } from "./data-structures"; export type Comparator = (a: T, b: T) => number; export type DFSOrderPattern = 'pre' | 'in' | 'post'; export type BTNCallback = (node: N) => D; export enum CP { lt = 'lt', eq = 'eq', gt = 'gt' } export interface IterableWithSize extends Iterable { size: number | ((...args: any[]) => number); } export interface IterableWithLength extends Iterable { length: number | ((...args: any[]) => number); } export type IterableWithSizeOrLength = IterableWithSize | IterableWithLength export type BinaryTreePrintOptions = { isShowUndefined?: boolean, isShowNull?: boolean, isShowRedBlackNIL?: boolean } export type BTNExemplar = [BTNKey | null | undefined, T | undefined] | BTNKeyOrNode export type BTNKeyOrNode = BTNKey | null | undefined | N; export type BSTNKeyOrNode = BTNKey | undefined | N;