UNPKG

@thecodingmachine/redux-toolkit-wrapper

Version:

[Redux-toolkit](https://redux-toolkit.js.org/) wrapper used to write less code regarding classic CRUD operations

12 lines (11 loc) 539 B
import { Dispatch } from 'redux'; import { AsyncThunk, AsyncThunkPayloadCreator } from '@reduxjs/toolkit'; declare type AsyncThunkConfig = { state?: unknown; dispatch?: Dispatch; extra?: unknown; rejectValue?: unknown; serializedErrorType?: unknown; }; export declare function buildAsyncActions<Returned, ThunkArg = void, ThunkApiConfig extends AsyncThunkConfig = {}>(actionName: string, service: AsyncThunkPayloadCreator<Returned, ThunkArg, ThunkApiConfig>): AsyncThunk<Returned, ThunkArg, ThunkApiConfig>; export {};