mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
fix lint
This commit is contained in:
1
types/redux-state-sync/index.d.ts
vendored
1
types/redux-state-sync/index.d.ts
vendored
@@ -3,6 +3,7 @@
|
||||
// Definitions by: MU AOHUA <https://github.com/AOHUA>
|
||||
// AntonioMendez <https://github.com/AntonioMendez>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
import { Store, Reducer, Middleware, AnyAction } from "redux";
|
||||
import BroadcastChannel from "broadcast-channel";
|
||||
|
||||
7
types/redux-state-sync/package.json
Normal file
7
types/redux-state-sync/package.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"broadcast-channel": "^2.1.8",
|
||||
"redux": "^4.0.1"
|
||||
}
|
||||
}
|
||||
@@ -6,19 +6,17 @@ interface TestState {
|
||||
b: string;
|
||||
c: string;
|
||||
}
|
||||
const middlewares = [
|
||||
createStateSyncMiddleware({
|
||||
const middleware = createStateSyncMiddleware({
|
||||
channel: 'test',
|
||||
predicate: (type) => true,
|
||||
blacklist: [],
|
||||
whitelist: [],
|
||||
broadcastChannelOption: {}
|
||||
}),
|
||||
];
|
||||
});
|
||||
|
||||
function rootReducer(state: TestState, action: Action): TestState {
|
||||
return state;
|
||||
}
|
||||
|
||||
const store = createStore(withReduxStateSync(rootReducer), ['test'], ...applyMiddleware(middlewares));
|
||||
const store = createStore(withReduxStateSync(rootReducer), ['test'], applyMiddleware(middleware));
|
||||
initStateWithPrevTab(store);
|
||||
|
||||
Reference in New Issue
Block a user