mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
58 lines
1.3 KiB
TypeScript
58 lines
1.3 KiB
TypeScript
import {
|
|
Middleware,
|
|
Reducer,
|
|
applyMiddleware,
|
|
createStore
|
|
} from 'redux';
|
|
import devToolsEnhancer, { composeWithDevTools } from 'remote-redux-devtools';
|
|
|
|
const composeEnhancers = composeWithDevTools();
|
|
|
|
const reducer: Reducer<{}> = () => ({});
|
|
const middleware: Middleware[] = [];
|
|
const store = createStore(reducer, composeEnhancers(
|
|
applyMiddleware(...middleware)
|
|
));
|
|
|
|
const store1 = createStore(reducer, composeWithDevTools({
|
|
actionSanitizer: (action) => action,
|
|
stateSanitizer: (state) => state
|
|
}));
|
|
|
|
const store2 = createStore(reducer, composeWithDevTools({
|
|
actionsBlacklist: 'SOME_ACTION'
|
|
}));
|
|
|
|
const store3 = createStore(reducer, composeWithDevTools({
|
|
shouldRecordChanges: true,
|
|
shouldStartLocked: true,
|
|
shouldHotReload: true,
|
|
shouldCatchErrors: true
|
|
}));
|
|
|
|
const store4 = createStore(reducer, composeWithDevTools({
|
|
id: 'android-app',
|
|
name: 'Android app',
|
|
sendTo: 'https://example.com'
|
|
}));
|
|
|
|
const store5 = createStore(reducer, composeWithDevTools({
|
|
name: 'Android app',
|
|
realtime: true,
|
|
hostname: 'localhost',
|
|
port: 8000,
|
|
secure: false,
|
|
maxAge: 30,
|
|
startOn: '@@START',
|
|
stopOn: '@@STOP',
|
|
sendOn: ['@@SEND'],
|
|
sendOnError: 2
|
|
}));
|
|
|
|
const store6 = createStore(reducer, devToolsEnhancer());
|
|
|
|
const store7 = createStore(reducer, devToolsEnhancer({
|
|
hostname: 'localhost',
|
|
port: 8000
|
|
}));
|