Reference · Where every tie sits
GamesOptionstype
How the games of a flat list are grouped into ties: the stages in order, which one is the third-place match, which are two legs, and how long each series is.
Import it
import type { GamesOptions } from "@johnmorrisdotca/taisen-brackets/layout";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface GamesOptions {
stages: readonly string[];
third?: string;
aggregate?: readonly string[];
series?: Readonly<Record<string, number>>;
}
Members
| Name | Type | Description |
|---|---|---|
stages | readonly string[] | The knockout stages in order, first round first: |
third (optional) | string | undefined | The stage of the third-place match, if the data has one. |
aggregate (optional) | readonly string[] | undefined | Stages played in two legs, added up. Several games of one pair in any other stage are a replay. |
series (optional) | Readonly<Record<string, number>> | undefined | Stages played as a series, with their length: |
Examples
import { matchupsFromGames, type GamesOptions } from "@johnmorrisdotca/taisen-brackets";
const options: GamesOptions = { stages: ["Semi-final", "Final"], third: "Third place" };
console.log(options.stages.length);2What it prints (run when this page was built)