export type OptionSimple = string; export interface Action { type: T; } export interface AnyAction extends Action { [extraProps: string]: any; } export interface OptionAdvanced { type: string; payload?: string | ((action: Action) => string); } export type CreateReducerOption = | OptionAdvanced | OptionSimple | Array; export type OptionCustom = { type: string; handler: Reducer; }; export type CreateReduerOptionCustom = | OptionCustom | Array>; export type Reducer = ( state: S | undefined, action: A ) => S;