Installation
npm install --save @types/redux-socket.io
Summary
This package contains type definitions for redux-socket.io (https://github.com/itaylor/redux-socket.io#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-socket.io.
index.d.ts
/// <reference types="socket.io-client" />
import { Action, Dispatch, Middleware } from "redux";
export interface MiddlewareOptions {
eventName?: string | undefined;
execute?:
| (<S>(action: Action, emitBound: SocketIOClient.Socket, next: Dispatch<S>, dispatch: Dispatch<S>) => any)
| undefined;
}
export default function createSocketIoMiddleware(
socket: SocketIOClient.Socket,
criteria: string | readonly string[] | ((type: string, action: Action) => boolean),
options?: MiddlewareOptions,
): Middleware;
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:24 GMT
- Dependencies: @types/socket.io-client, redux
Credits
These definitions were written by Igor Voropaev.