/** * Subscribe to a WebSocket event. * - Without callback: returns the latest received value (reactive state). * - With callback: calls your handler on each event (stable ref via useEffectEvent). * * Subscription attaches automatically once the socket is ready (no-op while null). * * @example * const order = useSocketEvent('order.created'); * * @example * useSocketEvent('order.created', (order) => playSound('new-order')); */ export declare function useSocketEvent(event: string, callback?: (data: T, raw?: unknown) => void): T | undefined; /** * Accumulate WebSocket events into an array. * - Without callback: returns accumulated array (reactive state). * - With callback: calls your handler on each event, you manage your own state. * * @example * const messages = useSocketStream('chat.message'); * * @example * useSocketStream('chat.message', (msg) => * setMessages((prev) => [msg, ...prev].slice(0, 50)), * ); */ export declare function useSocketStream(event: string, callback?: (data: T, raw?: unknown) => void): T[]; /** * Subscribe to a WebSocket event with just a callback — no state, no return value. * Fire-and-forget: side effects, logging, analytics, sounds, browser notifications. * * @example * useSocketCallback('order.created', (order) => playSound('new-order')); */ export declare function useSocketCallback(event: string, callback: (data: T, raw?: unknown) => void): void;