brackt/database/context.browser-stub.ts
Chris Parsons 2b9ffc0b62 Fix no-explicit-any warnings and upgrade tsconfig to ES2023
- Replace all `any` types with proper types or `unknown` across ~20 files
- Add typed socket payload interfaces in draft route and useDraftSocket
- Use any[] with eslint-disable for socket.io callbacks (legitimate escape hatch)
- Bump all tsconfigs from ES2022 → ES2023 to support toSorted/toReversed
- Fix cascading type errors uncovered by removing any: Map.get narrowing,
  participant relation types, ChartDataPoint, Partial<NewSeason> indexing
- Add ParticipantResultWithParticipant type to participant-result model
- Fix test fixtures to match updated interfaces (DraftCell, ParticipantResult)
- Fix duplicate getQPStandings import in sportsSeasonId.server.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 09:40:15 -07:00

9 lines
357 B
TypeScript

// Browser-safe stub for database/context
// The real implementation uses Node.js AsyncLocalStorage which is server-only.
// This stub is used during the client build to avoid bundling server-only code.
export const DatabaseContext = null as unknown;
export function database(): never {
throw new Error("database() can only be called on the server");
}