export type Action = { type: string; payload: T; }; export type ActionCreator = undefined extends T ? (payload?: T) => Action : (payload: T) => Action; export declare function createAction(type: string): ActionCreator;