Fix TypeScript errors: update GroupStandingData type to use findMatchesByGroupIds
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ae3366f571
commit
0a21a74321
1 changed files with 2 additions and 1 deletions
|
|
@ -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[] = [];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue