mantimon-tcg/frontend/src/socket/index.ts
Cal Corum 3a566ffd5a Add Socket.IO client with typed game events (F0-006)
- Create typed event interfaces for game namespace
- Add full game state types (GameState, Card, CardInPlay, etc.)
- Implement connection manager singleton with auth
- Add auto-reconnection with exponential backoff
- Provide helper methods for game actions (joinGame, sendAction, etc.)
- Add typed event subscription helpers with unsubscribe

Phase F0 progress: 7/8 tasks complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:15:17 -06:00

30 lines
535 B
TypeScript

/**
* Socket.IO module exports.
*/
export { socketClient, default } from './client'
export type { ConnectionState, SocketClientOptions } from './client'
export type {
// Event types
ClientToServerEvents,
ServerToClientEvents,
// Game types
GameState,
PlayerState,
OpponentState,
Card,
CardInPlay,
Attack,
StatusCondition,
// Action types
GameAction,
GameActionType,
ActionResult,
ForcedAction,
// Other types
TurnPhase,
GameError,
GameOverData,
GameOverReason,
GameStats,
} from './types'