UNPKG

@yookue/ts-multi-map

Version:

Multiple key/value map & range map for typescript

28 lines (27 loc) 1.31 kB
import { type MultiValueMapEntries } from ".."; export declare class ReadonlyMultiValueMap<K, V> implements Omit<ReadonlyMap<K, V[]>, 'forEach' | 'get' | 'has' | 'entries' | 'keys' | 'values'> { private readonly map; static of<K, V>(entries?: MultiValueMapEntries<K, V>): ReadonlyMultiValueMap<K, V>; constructor(entries?: MultiValueMapEntries<K, V>); get(key: K, defaults?: V[]): V[] | undefined; keys(): K[]; values(): V[][]; entries(): [K, V[]][]; forEach(callback: (values?: V[], key?: K) => void, thisArg?: any): void; forEachIndexing(callback: (values?: V[], key?: K, index?: number) => void, thisArg?: any): void; forEachBreakable(callback: (values?: V[], key?: K) => boolean, thisArg?: any): void; hasKey(key: K): boolean; hasKeyValue(key: K, value: V): boolean; hasAnyKeys(keys: K[]): boolean; hasAllKeys(keys: K[]): boolean; hasValue(values: V[], exact?: boolean): boolean; hasAnyValues(values: V[][], exact?: boolean): boolean; hasAllValues(values: V[][], exact?: boolean): boolean; isEmpty(): boolean; isNotEmpty(): boolean; getKey(values: V[], defaults?: K): K | undefined; [Symbol.iterator](): IterableIterator<[K, V[]]>; get size(): number; get [Symbol.toStringTag](): string; toString(): string; }