JudoWinsOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What judoWins can be told: the language, the round names, how to make an athlete of a team, and whether byes are listed.
インポート
import type { JudoWinsOptions } from "@johnmorrisdotca/taisen-brackets";
定義
interface JudoWinsOptions {
locale?: DrawOptions["locale"];
words?: DrawOptions["words"];
roundNames?: DrawOptions["roundNames"];
athlete?: (team: Team) => JudoAthlete;
byes?: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
locale (省略可) | string | Locale | undefined | |
words (省略可) | Partial<Words> | undefined | |
roundNames (省略可) | readonly string[] | { rounds: readonly { name: string; }[]; } | undefined | The names of the rounds, as for |
athlete (省略可) | ((team: Team) => JudoAthlete) | undefined | Turns a bracket's team into the athlete the panel draws. Default: its name, flag, mark and |
byes (省略可) | boolean | undefined | Write a bye for each round the athlete skipped before their first contest. Default true. |
例
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);2出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。