/** * A connected Server-Sent Events client. * * This is the subset of the underlying stream that the server needs in order to * broadcast file-change events and shut connections down — the route that * accepts the connection owns the stream itself and keeps the request handler * alive for as long as the client stays connected. */ export interface SseClient { /** * Push a named event to this client. */ send(event: string, data: string): Promise; /** * True once the client disconnected or the connection was closed. */ readonly closed: boolean; /** * Close the connection and release the request handler holding it open. */ close(): Promise; } export interface CommonLogger { debug(...messages: unknown[]): void; info(...messages: unknown[]): void; warn(...messages: unknown[]): void; error(...messages: unknown[]): void; }