buildCreateSlice and lazy slices with typescript #4366
-
`import { asyncThunkCreator, buildCreateSlice } from "@reduxjs/toolkit"; const createAppSlice = buildCreateSlice({ interface State { const initialState: State = { export const accountsSlice = createAppSlice({ declare module "@/store/index" { const injectedReducers = rootReducer.inject(accountsSlice); export const { getAccountsListThunk } = accountsSlice.actions;`
How can I make correct typescript code? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
try using |
Beta Was this translation helpful? Give feedback.
try using
void
instead ofnever
to indicate you don't need an argument