n8n/packages/cli/src/sse-channel.d.ts
कारतोफ्फेलस्क्रिप्ट™ 7e1a13f9b2
fix: Upgrade sse-channel to mitigate CVE-2019-10744 (#4835)
sse-channel 4 removed CORS support, that's why we need to handle CORS for `/push` ourselves now.
2022-12-07 15:13:36 +01:00

18 lines
377 B
TypeScript

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