Reference · The road to the final
RoadRecordtype
One finalist's record on the way.
Import it
import type { RoadRecord } from "@johnmorrisdotca/taisen-brackets/road";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface RoadRecord {
name: string;
matches: number;
won: number;
drawn: number;
lost: number;
scored: number;
conceded: number;
}
Members
| Name | Type | Description |
|---|---|---|
name | string | |
matches | number | Matches played in the group and the knockout rounds (not the final), and how many it won, drew and lost. |
won | number | |
drawn | number | |
lost | number | |
scored | number | The goals it scored and let in over the matches whose score is a pair of numbers. |
conceded | number |
Examples
import { roadToFinal, type RoadRecord } from "@johnmorrisdotca/taisen-brackets";
const chart = roadToFinal([{ name: "Owls", path: [{ round: "semi-final", opponent: { name: "Stars" }, score: [2, 0] }] }, { name: "Gulls", path: [] }]);
const owls: RoadRecord = chart.totals.finalists[0];
console.log(owls.matches, owls.won, owls.scored);1 1 2What it prints (run when this page was built)