UNPKG

@n1k1t/mock-server

Version:

The ultimate toolkit to intercept, transform, and simulate HTTP/WS traffic with type-safe expectations

6 lines 376 B
import type { Server } from 'socket.io'; export interface ISocketIoExchangeService<TSchema extends object> { publish: <K extends keyof TSchema & string>(channel: K, payload: TSchema[K]) => unknown; } export declare const buildSocketIoExchange: <TSchema extends object>(io: Pick<Server, "emit">) => ISocketIoExchangeService<TSchema>; //# sourceMappingURL=socket-io.d.ts.map