import * as Immutable from "immutable"; export declare type StateKey = S extends State ? (K extends string ? (K & keyof any) : never) : never; export declare type StateArgs = keyof any | State | StateConstructor; export declare type ObjectAsMap = Immutable.Map; export interface StateConstructor = StateKey> { readonly Key: Key; new (o?: Partial): S; fromJS?: (o: Partial) => S; } export interface State { readonly type: T; toJS?: () => any; } export interface RootState extends State, Record { } /** * Function to patch an existing state * * @param {S} state * @param patches * @returns {S} */ export declare function patchState = Partial>(state: S, ...patches: Array): S;