Skip to content

Commit fd0c4db

Browse files
refactor(client): migrate more files to TS (freeCodeCamp#59202)
1 parent 83a59e0 commit fd0c4db

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import rootEpic from './root-epic';
99
import rootReducer from './root-reducer';
1010
import rootSaga from './root-saga';
1111

12+
declare const module: {
13+
hot?: {
14+
accept: (path: string, callback: () => void) => void;
15+
};
16+
};
17+
1218
const { environment } = envData;
1319

1420
const clientSide = isBrowser();
@@ -46,11 +52,15 @@ export const createStore = (preloadedState = {}) => {
4652
);
4753
}
4854
sagaMiddleware.run(rootSaga);
55+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
4956
epicMiddleware.run(rootEpic);
57+
5058
if (module.hot) {
5159
// Enable Webpack hot module replacement for reducers
5260
module.hot.accept('./root-reducer', () => {
61+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports
5362
const nextRootReducer = require('./root-reducer');
63+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
5464
store.replaceReducer(nextRootReducer);
5565
});
5666
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { combineEpics } from 'redux-observable';
33
import { epics as challengeEpics } from '../templates/Challenges/redux';
44
import { epics as appEpics } from '.';
55

6+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
67
const rootEpic = combineEpics(...appEpics, ...challengeEpics);
78

89
export default rootEpic;

0 commit comments

Comments
 (0)