Reference · Where every tie sits
Resulttype
What a tie came to, worked out from its games.
Import it
import type { Result } from "@johnmorrisdotca/taisen-brackets/layout";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface Result {
kind: MatchupKind;
score: readonly [
number,
number
] | null;
played: number;
bestOf: number | null;
pens: readonly [
number,
number
] | null;
extraTime: boolean;
replays: number;
games: readonly (readonly [
number,
number
])[];
decided: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
kind | MatchupKind | |
score | readonly [number, number] | null | The number drawn for each side: goals in a game, games won in a series, the total of an aggregate. |
played | number | The games played. |
bestOf | number | null | |
pens | readonly [number, number] | null | |
extraTime | boolean | |
replays | number | Replays played. |
games | readonly (readonly [number, number])[] | The scores of the games, for a series or an aggregate, in the order of |
decided | boolean | Whether one side has gone through. |
Examples
import { layoutBracket, type Result } from "@johnmorrisdotca/taisen-brackets";
const result: Result = layoutBracket([{ sides: ["ARG", "FRA"], score: [3, 3], pens: [4, 2] }]).ties[0].result;
console.log(result.score, result.pens, result.decided);[ 3, 3 ] [ 4, 2 ] trueWhat it prints (run when this page was built)