UNPKG

red-redux-class

Version:

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

35 lines (34 loc) 1.44 kB
import { Validator } from 'prop-types'; import { IForEachInstanceCallback, IReduxClass } from './ReduxClass.interface'; import { PureObject } from './ReduxClass.types'; import { NEW_KEY, TYPEOF_KEY } from './ReduxClass.constants'; export declare class ReduxClass extends PureObject implements IReduxClass { ['constructor']: typeof ReduxClass; protected [NEW_KEY]: boolean; protected [TYPEOF_KEY]: symbol; static defaults: PureObject; static types: PureObject; static isReduxClass(object: object | undefined): boolean; static propType(): Validator<object>; protected _initNew(): void; protected _initType(): void; protected _initialize(initialState: object | IReduxClass): ReduxClass; protected _initHiddenProperty(key: string, value: any): void; protected _initDefaults(): void; constructor(initialState?: object | ReduxClass); protected _new(this: ReduxClass): ReduxClass; protected _setAttr(key: string, value: any): ReduxClass; _shouldBeNew(): void; forEachInstance(callback: IForEachInstanceCallback): void; getNew(): ReduxClass; newPath(path: string): ReduxClass[]; new(): ReduxClass; get(key: string): any; getPath(path: string): any; set(key: string, value: any): ReduxClass; setData(data: object): ReduxClass; isNew(): boolean; $setNew(): void; $setNotNew(): void; $getType(): symbol; }