Reference · The road to the final
RoadTotalstype
The numbers behind a road chart.
Import it
import type { RoadTotals } from "@johnmorrisdotca/taisen-brackets/road";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface RoadTotals {
finalists: [
RoadRecord,
RoadRecord
];
rounds: string[];
played: boolean;
champion: string | null;
}
Members
| Name | Type | Description |
|---|---|---|
finalists | [RoadRecord, RoadRecord] | |
rounds | string[] | The rounds of the chart, the earliest first, as keys. |
played | boolean | The final has a score. |
champion | string | null | The winner of the final, or null when it has not been played or is level. |
Examples
import { roadToFinal, type RoadTotals } from "@johnmorrisdotca/taisen-brackets";
const totals: RoadTotals = roadToFinal([{ name: "Owls", path: [] }, { name: "Gulls", path: [] }]).totals;
console.log(totals.played, totals.champion);false nullWhat it prints (run when this page was built)