Reference · Where every tie sits
Teamtype
A side of a tie: a team, with the marks and labels a drawing needs. Only id and name are required.
Import it
import type { Team } from "@johnmorrisdotca/taisen-brackets/layout";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
interface Team {
id: SideId;
name: string;
abbr?: string;
seed?: number;
tag?: string;
mark?: string;
group?: string;
color?: string;
names?: Readonly<Record<string, string>>;
region?: string;
flag?: string;
code?: string;
}
Members
| Name | Type | Description |
|---|---|---|
id | SideId | |
name | string | |
abbr (optional) | string | undefined | A short name for a small box (three letters is usual). Left out, one is made from the name. |
seed (optional) | number | undefined | The seed, shown beside the name when |
tag (optional) | string | undefined | A tag for the road look's seed tags ( |
mark (optional) | string | undefined | The team's mark: a logo or a flag. Either the address of an image ( |
group (optional) | string | undefined | The half this team belongs to when the halves are named: a conference, a region, a group. |
color (optional) | string | undefined | A colour for the team's initials when it has no mark, any CSS colour. |
names (optional) | Readonly<Record<string, string>> | undefined | The name in other languages, by locale code: |
region (optional) | string | undefined | An ISO 3166 region code ( |
flag (optional) | string | undefined | A country code ( |
code (optional) | string | undefined | The three letters of the team's country ( |
Examples
import { drawBracket, type Team } from "@johnmorrisdotca/taisen-brackets";
const argentina: Team = { id: "ARG", name: "Argentina", abbr: "ARG", flag: "AR" };
const svg = drawBracket({ teams: [argentina], matchups: [{ sides: ["ARG", "FRA"], score: [3, 3], pens: [4, 2] }] });
console.log(svg.includes("Argentina"));trueWhat it prints (run when this page was built)