IBracketMatch

interface
Data & Models

A single match between two competitors. competitorA/B are nullable so the bracket can render "TBD" placeholders. scoreA/B accept string for non-numeric markers. nextMatchId lets OrigamBracket draw connectors automatically.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

id
requis
string | number
Stable identifier — required for connector linking.
competitorA
requis
IBracketCompetitor | null
Left-side / top-side competitor. null = TBD or bye.
competitorB
requis
IBracketCompetitor | null
Right-side / bottom-side competitor. null = TBD or bye.
scoreA
number | string
Score of competitorA. Accepts string for non-numeric markers.
scoreB
number | string
Score of competitorB. Accepts string for non-numeric markers.
winnerId
string | number | null
Identifier of the declared winner. Used to apply the --winner modifier class.
status
TBracketMatchStatus
Optional lifecycle marker. Drives the visual --status-{value} modifier on the match card.
nextMatchId
string | number
Optional id of the downstream match this one feeds into — used by the connector layout.
advantage
IBracketMatchAdvantage
Optional head-start for one competitor (double-elimination Grand Final advantage).
scheduledAt
string
ISO date string — informative only, displayed when present.
metadata
Record<string, unknown>
Free-form payload — never read by the component.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Defining a completed match

typescript