mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
19 lines
499 B
TypeScript
19 lines
499 B
TypeScript
import cablecar, { Options } from 'redux-cablecar';
|
|
import { applyMiddleware, createStore } from 'redux';
|
|
|
|
const store = createStore(() => null, applyMiddleware(cablecar));
|
|
|
|
cablecar.setProvider('testProvider');
|
|
|
|
const car = cablecar.connect(store, 'testChannel');
|
|
|
|
const options: Options = {
|
|
connected: () => { },
|
|
prefix: 'ASDF'
|
|
};
|
|
|
|
const anotherCar = cablecar.connect(store, 'secondeTestChannel', options);
|
|
|
|
car.perform('activate', { data: 'something' });
|
|
anotherCar.send('noice_action');
|