/**
* must be object.
* For string, number e.t.c use Set instead
* */
export declare class HashedArray {
mapper: (a: A) => PropertyKey;
array: A[];
o: {
[key: string]: A;
};
constructor(mapper?: (a: A) => PropertyKey, array?: A[], o?: {
[key: string]: A;
});
insert(x: A, key?: PropertyKey): this;
replace(x: A, key?: PropertyKey): this;
update(x: A, key?: PropertyKey): this;
/**
* insert or replace
* */
upsert(x: A, key?: PropertyKey): this;
remove(x: A): this;
removeByKey(key: PropertyKey): this;
isEmpty(isValid: (x: A) => boolean): boolean;
clear(): A[];
get(key: PropertyKey): A | undefined;
has(key: PropertyKey): boolean;
set(key: PropertyKey, x: A): this;
static from(xs: A[]): HashedArray;
}