n8n/packages/cli/src/sse-channel.d.ts
कारतोफ्फेलस्क्रिप्ट™ 538984dc2f
feat(core): Add support for WebSockets as an alternative to Server-Sent Events (#5443)
Co-authored-by: Matthijs Knigge <matthijs@volcano.nl>
2023-02-10 15:02:47 +01:00

18 lines
410 B
TypeScript

import type { PushRequest, PushResponse } from './push/types';
declare module 'sse-channel' {
declare class Channel {
constructor();
on(event: string, handler: (channel: string, res: PushResponse) => void): void;
removeClient: (res: PushResponse) => void;
addClient: (req: PushRequest, res: PushResponse) => void;
send: (msg: string, clients?: PushResponse[]) => void;
}
export = Channel;
}