14 lines
448 B
TypeScript
14 lines
448 B
TypeScript
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>;
|
|
}
|