UNPKG

red-redux-class

Version:

Use objects and composition for creating complex reducers which can be easily maintained.

21 lines (20 loc) 738 B
export declare type IForEachInstanceCallback = (attr: any, key: string, self: IReduxClass) => void; export interface IReduxClass { forEachInstance(callback: IForEachInstanceCallback): void; newPath(path: string): IReduxClass[]; $setNew(): void; $setNotNew(): void; _shouldBeNew(): void; getNew(): IReduxClass; set(key: string, value: any): IReduxClass; } export interface IReduxClassArray extends IReduxClass { isEmpty(): boolean; toJSON(): any[]; getLength(): number; getArray(): any[]; get(key: string | number): any; set(key: string, value: any): IReduxClass; setArray(_array: any[]): IReduxClass; setArrayElement(key: number, value: any): IReduxClass; }