Reference · The road to the final
RoadTeamtype
A team of a road chart: a Team whose id is optional (a standalone finalist needs only a name), with logo as another name for mark.
Import it
import type { RoadTeam } from "@johnmorrisdotca/taisen-brackets/road";
Also exported from: @johnmorrisdotca/taisen-brackets
Definition
type RoadTeam = Omit<Team, "id" | "group"> & {
id?: SideId;
logo?: string;
};
Members
| Name | Type | Description |
|---|---|---|
mark (optional) | string | undefined | The team's mark: a logo or a flag. Either the address of an image ( |
color (optional) | string | undefined | A colour for the team's initials when it has no mark, any CSS colour. |
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 ( |
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 ( |
id (optional) | SideId | undefined | |
logo (optional) | string | undefined | The address or inline SVG of a flag or a crest: another name for |
Examples
import { roadToFinal, type RoadTeam } from "@johnmorrisdotca/taisen-brackets";
const gulls: RoadTeam = { name: "Harbour City Gulls", abbr: "HCG", color: "#1d4f91" };
const owls: RoadTeam = { name: "Northern Owls", abbr: "NOW" };
const chart = roadToFinal([{ ...gulls, path: [] }, { ...owls, path: [] }]);
console.log(chart.totals.finalists.map((one) => one.name));[ 'Harbour City Gulls', 'Northern Owls' ]What it prints (run when this page was built)