UNPKG

@advancedmap/advancedmap

Version:

An Advanced Map structure, which is strongly typed and documented in TS.

19 lines 883 B
import type { IAdvancedMapBase } from './types/IAdvancedMapBase'; export declare const enum PositionOrder { First = "first", Last = "last" } export declare class AdvancedMap<K, V> extends Map<K, V> implements IAdvancedMapBase<K, V> { protected _array: V[] | null; constructor(iterable?: readonly (readonly [K, V])[]); set(key: K, val: V): this; safeSet(key: K, val: V, overwrite?: boolean): this; array(): V[]; find<T = any>(fn: (value: V, key: K, collection: AdvancedMap<K, V>) => boolean, thisArg?: T): V | undefined; tap<T = any>(fn: (collection: AdvancedMap<K, V>) => void, thisArg?: T): this; sort(compareFunction?: ((a: V, b: V, c?: K, d?: K) => number)): AdvancedMap<K, V>; position(order: PositionOrder, amount?: number): V | V[]; private _first; private _last; } //# sourceMappingURL=AdvancedMap.d.ts.map