All files / src/store configureStore.ts

0% Statements 0/19
100% Branches 0/0
0% Functions 0/1
0% Lines 0/19

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52                                                                                                       
import { configureStore } from "@reduxjs/toolkit";
import rootReducer from "./rootReducer";
import electronMiddleware from "./features/electron/electronMiddleware";
import buildGameMiddleware from "./features/buildGame/buildGameMiddleware";
import musicMiddleware from "./features/music/musicMiddleware";
import soundFxMiddleware from "./features/soundfx/soundfxMiddleware";
import assetsMiddleware from "./features/assets/assetsMiddleware";
import undoMiddleware from "./features/undo/undoMiddleware";
import clipboardMiddleware from "./features/clipboard/clipboardMiddleware";
import projectMiddleware from "./features/project/projectMiddleware";
import spriteMiddleware from "./features/sprite/spriteMiddleware";
import throttleMiddleware from "./features/throttle/throttleMiddleware";
import trackerDocumentMiddleware from "./features/trackerDocument/trackerDocumentMiddleware";
import entitiesMiddleware from "./features/entities/entitiesMiddleware";
import settingsMiddleware from "./features/settings/settingsMiddleware";
import consoleMiddleware from "./features/console/consoleMiddleware";
 
export type RootState = ReturnType<typeof rootReducer>;
 
const store = configureStore({
  reducer: rootReducer,
  devTools: {
    latency: 200,
    actionsDenylist: ["editor/sceneHover"],
  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: false,
      immutableCheck: false,
    }).concat([
      throttleMiddleware,
      electronMiddleware,
      projectMiddleware,
      entitiesMiddleware,
      settingsMiddleware,
      spriteMiddleware,
      buildGameMiddleware,
      musicMiddleware,
      soundFxMiddleware,
      assetsMiddleware,
      consoleMiddleware,
      undoMiddleware,
      clipboardMiddleware,
      trackerDocumentMiddleware,
    ]),
});
 
export type AppDispatch = typeof store.dispatch;
export type AppStore = typeof store;
 
export default store;