export interface ServerEvents { connection: (clientId: string) => void; disconnect: (data: { clientId: string; reason: string; }) => void; subscribed: (data: { clientId: string; channel: string; params?: string[]; }) => void; unsubscribed: (data: { clientId: string; channel: string; }) => void; error: (error: Error) => void; clientError: (data: { clientId: string; error: Error; }) => void; } export interface ClientEvents { open: (event: Event) => void; close: (event: Event) => void; connected: (clientId: string) => void; disconnected: () => void; subscribed: (channel: string) => void; unsubscribed: (channel: string) => void; error: (error: any) => void; pong: () => void; message: (data: any) => void; reconnecting: (attempt: number) => void; reconnectFailed: () => void; pingTimeout: () => void; }