Reference · Where every tie sits
BracketInputtype
A bracket's input with its teams listed once: { matchups, teams }.
Import it
import type { BracketInput } from "@johnmorrisdotca/taisen-brackets/layout";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface BracketInput {
matchups: readonly Matchup[];
teams?: readonly Team[];
}
Members
| Name | Type | Description |
|---|---|---|
matchups | readonly Matchup[] | |
teams (optional) | readonly Team[] | undefined | The teams: names, marks, groups. A side named by an id that is not here is a team of that name. |
Examples
import { drawBracket, type BracketInput } from "@johnmorrisdotca/taisen-brackets";
const input: BracketInput = {
teams: [{ id: "A", name: "Aurora" }, { id: "H", name: "Harbour" }],
matchups: [{ sides: ["A", "H"], score: [2, 1] }],
};
console.log(drawBracket(input).includes("Aurora"));trueWhat it prints (run when this page was built)