Pular para o conteúdo principal

computePlayerStatLines

@raizfc/contracts


@raizfc/contracts / computePlayerStatLines

Function: computePlayerStatLines()

computePlayerStatLines(playerId, appearances): readonly Readonly<{ assists: number; categoryId?: string; championshipId?: string; games: number; goals: number; id: string; period: Readonly<{ id: string; label: string; }>; redCards: number; teamId?: string; yellowCards: number; }>[]

Defined in: ranking/player-stats-formula.ts:58

One aggregate "all teams" line (no teamId) plus one line per distinct team the player has a validated appearance for — categoryId is included on a team line only when every appearance for that team shares the same category (a player who moved categories within the same team keeps that line categoryless rather than guessing one). Per-championship lines and per-period splits beyond "career" are deliberately out of scope for this increment (registered in the EP-MVP-12.2 handoff) — championshipId never appears on a computed line.

Parameters

playerId

string

appearances

readonly Readonly<{ assists: number; categoryId?: string; categoryName?: string; goals: number; matchId: string; redCards: number; teamId: string; teamName: string; yellowCards: number; }>[]

Returns

readonly Readonly<{ assists: number; categoryId?: string; championshipId?: string; games: number; goals: number; id: string; period: Readonly<{ id: string; label: string; }>; redCards: number; teamId?: string; yellowCards: number; }>[]