UNPKG

redux-smart-creators

Version:
8 lines (7 loc) 850 B
import { ExtendableAsyncActionCreator } from '../types/asyncCreator'; interface AsyncGetterCreatorWithoutLabel<PackLabel extends string | null, PackSteps extends string> { <ActionType extends string>(actionType: ActionType): PackLabel extends string ? ExtendableAsyncActionCreator<`@@${PackLabel}/${ActionType}`, PackSteps> : ExtendableAsyncActionCreator<ActionType, PackSteps>; <ActionType extends string, Steps extends string>(actionType: ActionType, steps: Steps[]): PackLabel extends string ? ExtendableAsyncActionCreator<`$${PackLabel}/${ActionType}`, Steps> : ExtendableAsyncActionCreator<ActionType, Steps>; } export declare function makeAsyncCreatorGetter<PackLabel extends string | null, PackSteps extends string>(packLabel: PackLabel, packSteps: PackSteps[]): AsyncGetterCreatorWithoutLabel<PackLabel, PackSteps>; export {};