1.4.6 • Published 2 years ago

@types/redux-socket.io v1.4.6

Weekly downloads
377
License
MIT
Repository
github
Last release
2 years ago

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

// Type definitions for redux-socket.io 1.4
// Project: https://github.com/itaylor/redux-socket.io#readme
// Definitions by: Igor Voropaev <https://github.com/snakeego>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="socket.io-client" />

import { Middleware, Action, Dispatch } 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 | ReadonlyArray<string> | ((type: string, action: Action) => boolean)),
    options?: MiddlewareOptions
): Middleware;

Additional Details

Credits

These definitions were written by Igor Voropaev.

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

7 years ago