Reference · The road to the final
RoadFinalisttype
A finalist: a team and the matches it played on the way, the earliest first.
Import it
import type { RoadFinalist } from "@johnmorrisdotca/taisen-brackets/road";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface RoadFinalist extends RoadTeam {
path: readonly RoadMatch[];
group?: readonly RoadGroupMatch[];
}
Members
| Name | Type | Description |
|---|---|---|
path | readonly RoadMatch[] | The knockout matches before the final, the earliest first. |
group (optional) | readonly RoadGroupMatch[] | undefined | The group stage, in the order played. A row of small marks, codes and scores at the foot. |
mark (optional) | string | undefined | The team's mark: a logo or a flag. Either the address of an image ( |
color (optional) | string | undefined | A colour for the team's initials when it has no mark, any CSS colour. |
name | string | |
abbr (optional) | string | undefined | A short name for a small box (three letters is usual). Left out, one is made from the name. |
seed (optional) | number | undefined | The seed, shown beside the name when |
tag (optional) | string | undefined | A tag for the road look's seed tags ( |
names (optional) | Readonly<Record<string, string>> | undefined | The name in other languages, by locale code: |
region (optional) | string | undefined | An ISO 3166 region code ( |
flag (optional) | string | undefined | A country code ( |
code (optional) | string | undefined | The three letters of the team's country ( |
id (optional) | SideId | undefined | |
logo (optional) | string | undefined | The address or inline SVG of a flag or a crest: another name for |
Examples
import { roadToFinal, type RoadFinalist } from "@johnmorrisdotca/taisen-brackets";
const owls: RoadFinalist = { name: "Northern Owls", abbr: "NOW", path: [{ round: "semi-final", opponent: { name: "Valley Stars" }, score: [2, 0] }] };
const gulls: RoadFinalist = { name: "Harbour City Gulls", abbr: "HCG", path: [{ round: "semi-final", opponent: { name: "Metro Bolts" }, score: [2, 1] }] };
console.log(roadToFinal([owls, gulls]).totals.rounds);[ 'semi-final' ]What it prints (run when this page was built)