@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
37 lines (36 loc) • 1.45 kB
TypeScript
type VoidFn = () => void;
type Pair<KeyType, ValueType> = {
value?: ValueType;
map?: Map<KeyType, Pair<KeyType, ValueType>>;
revision?: number;
};
export type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn) => void;
export declare class DeepMap<KeyType, ValueType> {
private map;
private length;
private revision;
static clone<KeyType, ValueType>(map: DeepMap<KeyType, ValueType>): DeepMap<KeyType, ValueType>;
constructor(initial?: [KeyType[], ValueType][]);
set(keys: KeyType[] & {
length: Omit<number, 0>;
}, value: ValueType): this;
get(keys: KeyType[]): ValueType | undefined;
get size(): number;
clear(): void;
delete(keys: KeyType[]): boolean;
has(keys: KeyType[]): boolean;
private visitKey;
visit: (fn: DeepMapVisitFn<KeyType, ValueType>) => void;
visitDepthFirst: (fn: (value: ValueType, keys: KeyType[], indexInGroup: number, next?: VoidFn) => void) => void;
private visitWithNext;
private getArray;
values(): Generator<ValueType, void, unknown>;
keys(): Generator<KeyType[], void, unknown>;
entries(): Generator<[KeyType[], ValueType], void, unknown>;
topDownEntries(): [KeyType[], ValueType][];
topDownKeys(): KeyType[][];
topDownValues(): ValueType[];
private sortedIterator;
}
export declare function once<ReturnType>(fn: () => ReturnType): () => ReturnType;
export {};