redux-ws-middleware
Version:
This package makes web socket management much easier with redux
15 lines (14 loc) • 335 B
TypeScript
export declare enum SocketActionType {
CONNECTED = 0,
DISCONNECTED = 1
}
declare type Action<T = any> = {
type: T;
};
export declare type AnyAction<T = any> = Action<T> & {
[extraProps: string]: any;
};
export declare type SocketDispatch<A extends Action = AnyAction> = {
<T extends A>(action: T): T;
};
export {};