@rimbu/sorted
Version:
Immutable SortedMap and SortedSet implementations for TypeScript
29 lines (28 loc) • 1.49 kB
text/typescript
import { RSetBase } from '@rimbu/collection-types/set-custom';
import { Comp } from '@rimbu/common';
import type { SortedSet } from '@rimbu/sorted/set';
import { SortedSetBuilder, SortedSetEmpty, SortedSetInner, SortedSetLeaf, SortedSetNode } from '@rimbu/sorted/set-custom';
export declare class SortedSetContext<UT> extends RSetBase.ContextBase<UT, SortedSet.Types> implements SortedSet.Context<UT> {
readonly blockSizeBits: number;
readonly comp: Comp<UT>;
readonly maxEntries: number;
readonly minEntries: number;
readonly _empty: SortedSet<any>;
constructor(blockSizeBits: number, comp: Comp<UT>);
readonly typeTag = "SortedSet";
isNonEmptyInstance(source: any): source is any;
isValidValue(value: any): value is UT;
readonly builder: <T extends UT>() => SortedSetBuilder<T>;
createBuilder<T extends UT>(source?: SortedSet<T>): SortedSetBuilder<T>;
findIndex(value: UT, entries: readonly UT[]): number;
leaf(entries: readonly UT[]): SortedSetLeaf<UT>;
inner(entries: readonly UT[], children: readonly SortedSetNode<UT>[], size: number): SortedSetInner<UT>;
isSortedSetEmpty(obj: any): obj is SortedSetEmpty;
isSortedSetLeaf<T>(obj: any): obj is SortedSetLeaf<T>;
isSortedSetInner<T>(obj: any): obj is SortedSetInner<T>;
isSortedSetNode<T>(obj: any): obj is SortedSetNode<T>;
}
export declare function createSortedSetContext<UT>(options?: {
comp?: Comp<UT>;
blockSizeBits?: number;
}): SortedSet.Context<UT>;