import { Pushable } from "it-pushable"; export declare const FastifySSEPlugin: import("fastify").FastifyPluginAsync; export default FastifySSEPlugin; declare module "fastify" { interface EventMessage { /** * Message payload */ data?: string; /** * Message identifier, if set, client will send `Last-Event-ID: ` header on reconnect */ id?: string; /** * Message type */ event?: string; /** * Update client reconnect interval (how long will client wait before trying to reconnect). */ retry?: number; /** * Message comment */ comment?: string; } interface FastifyReply { sseContext: { source: Pushable; }; sse(source: AsyncIterable | EventMessage): void; } } export interface EventMessage { /** * Message payload */ data?: string; /** * Message identifier, if set, client will send `Last-Event-ID: ` header on reconnect */ id?: string; /** * Message type */ event?: string; /** * Update client reconnect interval (how long will client wait before trying to reconnect). */ retry?: number; /** * Message comment */ comment?: string; }