Reference · Where every tie sits
Gametype
One game of a tie: a match of a knockout, a game of a series, a leg of an aggregate, a replay.
Import it
import type { Game } from "@johnmorrisdotca/taisen-brackets/layout";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface Game {
score: readonly [
number,
number
];
date?: string;
extraTime?: boolean;
pens?: readonly [
number,
number
];
replay?: boolean;
note?: string;
}
Members
| Name | Type | Description |
|---|---|---|
score | readonly [number, number] | The score, in the order of the tie's |
date (optional) | string | undefined | |
extraTime (optional) | boolean | undefined | The game went to extra time (a.e.t.). |
pens (optional) | readonly [number, number] | undefined | The penalty shoot-out's score, in the order of the tie's |
replay (optional) | boolean | undefined | This game replays a drawn one (the World Cup of 1934 and 1938). |
note (optional) | string | undefined |
Examples
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"));trueWhat it prints (run when this page was built)