sse typing
This commit is contained in:
17
dist/sse.d.ts
vendored
Normal file
17
dist/sse.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export interface SseClient {
|
||||
id: number;
|
||||
send: (data: SseEvent) => void;
|
||||
}
|
||||
export interface SseEvent {
|
||||
type: string;
|
||||
data?: unknown;
|
||||
message?: string;
|
||||
}
|
||||
export declare class SseService {
|
||||
private clients;
|
||||
addClient(client: SseClient): void;
|
||||
removeClient(clientId: number): void;
|
||||
notifyClients(event: SseEvent): void;
|
||||
getClientCount(): number;
|
||||
}
|
||||
//# sourceMappingURL=sse.d.ts.map
|
||||
Reference in New Issue
Block a user