Tie型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A tie as the layout knows it. index is the position of its matchup in the list given.
インポート
import type { Tie } from "@johnmorrisdotca/taisen-brackets/layout";
ほかのエクスポート元: @johnmorrisdotca/taisen-brackets
定義
interface Tie {
index: number;
id: string;
round: number;
sides: readonly [
Team | null,
Team | null
];
winner: 0 | 1 | null;
result: Result;
date: string;
no: number | null;
third: boolean;
walkover: boolean;
note: string | null;
seeds?: readonly [
string | number | null,
string | number | null
];
from?: readonly [
Source | null,
Source | null
];
playIn?: boolean;
stage?: "play-in" | "repechage" | "bronze";
judo?: JudoOutcome;
home?: 0 | 1;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
index | number | |
id | string | |
round | number | The round (1 for the first round of the tree); the final round for a third-place match; 0 for a round-robin game. |
sides | readonly [Team | null, Team | null] | The two sides; |
winner | 0 | 1 | null | 0 or 1: the side that went through, or |
result | Result | |
date | string | |
no | number | null | |
third | boolean | |
walkover | boolean | |
note | string | null | |
seeds (省略可) | readonly [string | number | null, string | number | null] | undefined | The seed tags given for the tie's sides ( |
from (省略可) | readonly [Source | null, Source | null] | undefined | Where each side comes from, when the matchup's |
playIn (省略可) | boolean | undefined | The tie is a play-in game, a judo repechage contest or a bronze medal contest ( |
stage (省略可) | "play-in" | "repechage" | "bronze" | undefined | The tie's |
judo (省略可) | JudoOutcome | undefined | A judo contest's result, checked and worked out ( |
home (省略可) | 0 | 1 | undefined | The side at home ( |
例
import { layoutBracket, type Tie } from "@johnmorrisdotca/taisen-brackets";
const tie: Tie = layoutBracket([{ sides: ["Aurora", "Harbour"], score: [2, 1] }]).ties[0];
console.log(tie.sides.map((side) => side?.name), tie.winner);[ 'Aurora', 'Harbour' ] 0出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。