npm.io
3.0.4 • Published 2 years ago

@types/redux-cablecar

Licence
MIT
Version
3.0.4
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

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.