mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-01 05:06:39 +00:00
13 lines
483 B
TypeScript
13 lines
483 B
TypeScript
import { createAsyncThunk as baseCreateAsyncThunk, AsyncThunkPayloadCreator } from '@reduxjs/toolkit';
|
|
import { identity } from 'ramda';
|
|
import { ShlinkState } from '../../container/types';
|
|
|
|
export const createAsyncThunk = <Returned, ThunkArg>(
|
|
typePrefix: string,
|
|
payloadCreator: AsyncThunkPayloadCreator<Returned, ThunkArg, { state: ShlinkState, serializedErrorType: any }>,
|
|
) => baseCreateAsyncThunk(
|
|
typePrefix,
|
|
payloadCreator,
|
|
{ serializeError: identity },
|
|
);
|