funky-array/lib/funkyArray.d.ts

15 lines
448 B
TypeScript
Raw Normal View History

2024-07-02 09:56:53 +01:00
export default class FunkyArray<T, TT> {
private items;
private itemKeys;
private _getKeys;
set(key: T, item: TT, regenerate?: boolean): TT;
remove(key: T, regenerate?: boolean): boolean;
removeFirst(regenerate?: boolean): boolean;
first(): TT;
get length(): number;
get(key: T): TT | undefined;
has(key: T): boolean;
get keys(): Array<T>;
forEach(callback: (value: TT) => void): Promise<boolean>;
}