Reference · Draw a bracket, a table or a road to the final
JudoWinsOptionstype
What judoWins can be told: the language, the round names, how to make an athlete of a team, and whether byes are listed.
Import it
import type { JudoWinsOptions } from "@johnmorrisdotca/taisen-brackets";
Definition
interface JudoWinsOptions {
locale?: DrawOptions["locale"];
words?: DrawOptions["words"];
roundNames?: DrawOptions["roundNames"];
athlete?: (team: Team) => JudoAthlete;
byes?: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
locale (optional) | string | Locale | undefined | |
words (optional) | Partial<Words> | undefined | |
roundNames (optional) | readonly string[] | { rounds: readonly { name: string; }[]; } | undefined | The names of the rounds, as for |
athlete (optional) | ((team: Team) => JudoAthlete) | undefined | Turns a bracket's team into the athlete the panel draws. Default: its name, flag, mark and |
byes (optional) | boolean | undefined | Write a bye for each round the athlete skipped before their first contest. Default true. |
Examples
import { judoWins, type JudoWinsOptions } from "@johnmorrisdotca/taisen-brackets";
const options: JudoWinsOptions = { locale: "fr", byes: false };
console.log(judoWins([
{ id: "a", round: 1, sides: ["Haru", "Marc"], judo: { sides: [{ ippon: true }, {}], time: "1:12" } },
{ id: "f", round: 2, sides: ["Haru", "Levan"], judo: { sides: [{ wazaAri: 1 }, { yuko: 1 }], goldenScore: true, time: "5:40" } },
], "Haru", options).length);2What it prints (run when this page was built)