import type { AsyncThunkPayloadCreator } from '@reduxjs/toolkit'; import { createAsyncThunk as baseCreateAsyncThunk } from '@reduxjs/toolkit'; import { identity } from 'ramda'; import type { RootState } from '../container/store'; export const createAsyncThunk = ( typePrefix: string, payloadCreator: AsyncThunkPayloadCreator, ) => baseCreateAsyncThunk( typePrefix, payloadCreator, { serializeError: identity }, );