Installation
npm install --save @types/redux-cablecar
Summary
This package contains type definitions for redux-cablecar (https://github.com/ndhays/redux-cablecar#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-cablecar.
index.d.ts
import { Action, Middleware, Store } from "redux";
export interface Options {
connected?: (() => void) | undefined;
disconnected?: (() => void) | undefined;
params?: object | undefined;
prefix?: string | undefined;
optimisticOnFail?: boolean | undefined;
}
export interface CableCar {
changeChannel: (channel: string, options?: Options) => void;
getChannel: () => string;
getParams: () => object;
perform: (method: string, payload?: any) => void;
send: (action: string) => void;
}
declare var middleware: Middleware & {
connect: (store: Store, channel: string, options?: Options) => CableCar;
setProvider: (actionCableProvider: string) => void;
};
export default middleware;
Additional Details
- Last updated: Tue, 07 Nov 2023 1536 GMT
- Dependencies: redux
Credits
These definitions were written by Christoph Flick.