import type { IAnyAction } from './baseTypes'; import type { Joi, ExtractValues } from '../helpers'; declare type ChannelFactory = ((...payload: Args) => string | undefined) | (() => string | undefined); declare type ArgsForAction = E['payload'] extends object | string | number ? [E['payload']] : []; export interface IActionCreator> { (...params: Args): E; readonly type: E['type']; readonly schema: Joi.ObjectSchema; readonly channels?: Array>; } export interface ITopicBoundActionCreator> extends IActionCreator { readonly topic: T; } export interface IActionCreatorParam> { type: E['type']; schema: Joi.ObjectSchema; channels?: Array>; } export interface ICustomActionCreatorParam> { type: E['type']; schema: Joi.ObjectSchema; creator: (...payload: Args) => E; channels?: Array>; } export interface ITopicBoundActionCreatorParam> extends IActionCreatorParam { topic: T; } export interface ICustomTopicBoundActionCreatorParam> extends ICustomActionCreatorParam { topic: T; } export interface IActionCreatorFactory { (param: ITopicBoundActionCreatorParam): ITopicBoundActionCreator; (param: ICustomTopicBoundActionCreatorParam): ITopicBoundActionCreator, typeof param['topic'], Parameters>; (param: IActionCreatorParam): IActionCreator; (param: ICustomActionCreatorParam): IActionCreator, Parameters>; } export declare const actionCreator: IActionCreatorFactory; export declare type ActionsOfCreators[]> = ReturnType>; export {};