/** * Hook to access WebSocket state and methods */ import type { SocketStatus } from '../state/app-state.js'; /** * Access WebSocket state and methods * * @example * ```svelte * * *
Status: {socket.status}
*Connected: {socket.isConnected}
* * ``` */ export declare function useSocket(): { /** Current connection status */ readonly status: SocketStatus; /** Whether the socket is connected */ readonly isConnected: boolean; /** Whether the socket is reconnecting */ readonly isReconnecting: boolean; /** Number of reconnection attempts */ readonly reconnectAttempts: number; /** Last connection error */ readonly lastError: Event | null; /** Send a message through the socket */ send: (data: unknown) => void; /** Manually trigger reconnection */ reconnect: () => void; /** Disconnect from the server */ disconnect: () => void; }; //# sourceMappingURL=useSocket.svelte.d.ts.map