@yookue/ts-multi-map
Version:
Multiple key/value map & range map for typescript
28 lines (27 loc) • 1.3 kB
TypeScript
import { type MultiKeyMapEntries } from "..";
export declare class ReadonlyMultiKeyMap<K, V> implements Omit<ReadonlyMap<K[], V>, 'forEach' | 'get' | 'has' | 'entries' | 'keys' | 'values'> {
private readonly map;
static of<K, V>(entries?: MultiKeyMapEntries<K, V>): ReadonlyMultiKeyMap<K, V>;
constructor(entries?: MultiKeyMapEntries<K, V>);
get(keys: K[], defaults?: V): V | undefined;
keys(): K[][];
values(): V[];
entries(): [K[], V][];
forEach(callback: (value?: V, keys?: K[]) => void, thisArg?: any): void;
forEachIndexing(callback: (value?: V, keys?: K[], index?: number) => void, thisArg?: any): void;
forEachBreakable(callback: (value?: V, keys?: K[]) => boolean, thisArg?: any): void;
hasKey(keys: K[], exact?: boolean): boolean;
hasKeyValue(keys: K[], value: V): boolean;
hasAnyKeys(keys: K[][], exact?: boolean): boolean;
hasAllKeys(keys: K[][], exact?: boolean): boolean;
hasValue(value: V): boolean;
hasAnyValues(values: V[]): boolean;
hasAllValues(values: V[]): boolean;
isEmpty(): boolean;
isNotEmpty(): boolean;
getKey(value: V, defaults?: K[]): K[] | undefined;
[Symbol.iterator](): IterableIterator<[K[], V]>;
get size(): number;
get [Symbol.toStringTag](): string;
toString(): string;
}