import { configureStore, ThunkAction, Action, EnhancedStore, AnyAction } from "@reduxjs/toolkit"; import counterReducer from "../slices/counterSlice"; import noticeReducer from "../slices/noticeSlice"; import { ThunkMiddlewareFor } from "@reduxjs/toolkit/src/getDefaultMiddleware"; export const store: EnhancedStore< any, AnyAction, [ThunkMiddlewareFor] > = configureStore({ reducer: { counter: counterReducer, notice: noticeReducer } }); export type RootState = ReturnType; export type AppThunk = ThunkAction< ReturnType, RootState, unknown, Action >;