import { ActionCreator } from './create-action-creator';
import { Action, AnyAction } from './create-action';
declare type Primitive = undefined | null | boolean | string | number | Function;
export interface DeepImmutableArray<T> extends ReadonlyArray<DeepImmutable<T>> {
}
export interface DeepImmutableMap<K, V> extends ReadonlyMap<DeepImmutable<K>, DeepImmutable<V>> {
}
export declare type DeepImmutableObject<T> = {
    readonly [K in keyof T]: DeepImmutable<T[K]>;
};
export declare type Immutable<T> = T extends Primitive ? T : T extends Array<infer U> ? ReadonlyArray<U> : T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends ReadonlyArray<any> ? T : T extends ReadonlyMap<any, any> ? T : Readonly<T>;
export declare type DeepImmutable<T> = T extends Primitive ? T : T extends Array<infer U> ? DeepImmutableArray<U> : T extends Map<infer K, infer V> ? DeepImmutableMap<K, V> : T extends ReadonlyArray<infer U> ? DeepImmutableArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepImmutableMap<K, V> : DeepImmutableObject<T>;
export declare type Handler<TPrevState, TAction, TNextState extends TPrevState = TPrevState> = (prevState: TPrevState, action: TAction) => TNextState;
export declare type Reducer<TPrevState, TAction, TNextState extends TPrevState = TPrevState> = (state: TPrevState | undefined, action: TAction) => TNextState;
export declare type ActionType<T extends ActionCreator<AnyAction> | Reducer<any, Action<any>>> = T extends ActionCreator<AnyAction> ? ReturnType<T> : T extends Reducer<any, infer U> ? U : never;
export declare type ExtractAction<TAction, TKey> = TKey extends string ? TAction extends Action<TKey> ? TAction & Action<TKey> : AnyAction extends TAction ? TAction & Action<TKey> : never : TKey extends ActionCreator<AnyAction> ? ReturnType<TKey> extends TAction ? ReturnType<TKey> : never : TKey extends AnyAction ? TKey extends TAction ? TKey : never : never;
export {};
