Fix TypeScript errors: update GroupStandingData type to use findMatchesByGroupIds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Chris Parsons 2026-03-29 10:00:16 -07:00
parent ae3366f571
commit 0a21a74321

View file

@ -158,10 +158,11 @@ export async function loader(args: Route.LoaderArgs) {
let qpStandings: QPStanding[] = []; let qpStandings: QPStanding[] = [];
// Group standings for group-stage events (e.g. FIFA World Cup) // Group standings for group-stage events (e.g. FIFA World Cup)
type RawGroupMatch = Awaited<ReturnType<typeof findMatchesByGroupIds>> extends Map<string, Array<infer T>> ? T : never;
type GroupStandingData = { type GroupStandingData = {
groupName: string; groupName: string;
standings: ReturnType<typeof computeGroupStandings>; standings: ReturnType<typeof computeGroupStandings>;
matches: Array<Omit<Awaited<ReturnType<typeof findMatchesByGroupId>>[number], "scheduledAt"> & { scheduledAt: string | null }>; matches: Array<Omit<RawGroupMatch, "scheduledAt"> & { scheduledAt: string | null }>;
}; };
let groupStandings: GroupStandingData[] = []; let groupStandings: GroupStandingData[] = [];