Reference · The road to the final
RoadInputtype
What roadToFinal takes: the two finalists with their paths, or a tournament (a list of matchups, { matchups, teams } or a layout) whose final has two sides.
Import it
import type { RoadInput } from "@johnmorrisdotca/taisen-brackets/road";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
type RoadInput = readonly [
RoadFinalist,
RoadFinalist
] | BracketLayout | readonly Matchup[] | BracketInput;
Examples
import { roadToFinal, type RoadInput } from "@johnmorrisdotca/taisen-brackets";
const input: RoadInput = [{ sides: ["Aurora", "Harbour"], score: [2, 1] }, { sides: ["Cascade", "Delta"], score: [0, 1] }, { sides: ["Aurora", "Delta"], score: [3, 1] }];
console.log(roadToFinal(input).totals.champion);AuroraWhat it prints (run when this page was built)