Game型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One game of a tie: a match of a knockout, a game of a series, a leg of an aggregate, a replay.
インポート
import type { Game } from "@johnmorrisdotca/taisen-brackets/layout";
ほかのエクスポート元: @johnmorrisdotca/taisen-brackets
定義
interface Game {
score: readonly [
number,
number
];
date?: string;
extraTime?: boolean;
pens?: readonly [
number,
number
];
replay?: boolean;
note?: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
score | readonly [number, number] | The score, in the order of the tie's |
date (省略可) | string | undefined | |
extraTime (省略可) | boolean | undefined | The game went to extra time (a.e.t.). |
pens (省略可) | readonly [number, number] | undefined | The penalty shoot-out's score, in the order of the tie's |
replay (省略可) | boolean | undefined | This game replays a drawn one (the World Cup of 1934 and 1938). |
note (省略可) | string | undefined |
例
import { drawBracket, type Game } from "@johnmorrisdotca/taisen-brackets";
const first: Game = { score: [2, 1], date: "2026-06-01" };
const svg = drawBracket([{ sides: ["Aurora", "Harbour"], kind: "series", bestOf: 3, games: [first, { score: [0, 1] }, { score: [1, 0] }] }]);
console.log(svg.startsWith("<svg"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。