Reference · Where every tie sits
Tietype
A tie as the layout knows it. index is the position of its matchup in the list given.
Import it
import type { Tie } from "@johnmorrisdotca/taisen-brackets/layout";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
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;
}
Members
| Name | Type | Description |
|---|---|---|
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 (optional) | readonly [string | number | null, string | number | null] | undefined | The seed tags given for the tie's sides ( |
from (optional) | readonly [Source | null, Source | null] | undefined | Where each side comes from, when the matchup's |
playIn (optional) | boolean | undefined | The tie is a play-in game, a judo repechage contest or a bronze medal contest ( |
stage (optional) | "play-in" | "repechage" | "bronze" | undefined | The tie's |
judo (optional) | JudoOutcome | undefined | A judo contest's result, checked and worked out ( |
home (optional) | 0 | 1 | undefined | The side at home ( |
Examples
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' ] 0What it prints (run when this page was built)