type Action = any; export interface ActionWithPayload extends Action { payload: P; } export declare function createAction(type: T): Action; type FunctionType = (...args: any[]) => any; interface ActionCreatorsMapObject { [action: string]: FunctionType; } export type ActionsUnion = ReturnType; /** * NonFunctionKeys * @desc get union type of keys that are non-functions in object type `T` */ export type NonFunctionKeys = { [K in keyof T]: T[K] extends FunctionType ? never : K; }[keyof T]; /** * DeepReadonly * @desc Readonly that works for deeply nested structure */ export type DeepReadonly = T extends any[] ? _DeepReadonlyArray : T extends object ? _DeepReadonlyObject : T; /** * DeepReadonlyArray * @desc Nested array condition handler */ export interface _DeepReadonlyArray extends ReadonlyArray> { } /** * DeepReadonlyObject * @desc Nested object condition handler */ export type _DeepReadonlyObject = { readonly [P in NonFunctionKeys]: DeepReadonly; }; export {};