Reference · Draw a bracket, a table or a road to the final
GroupRowtype
One team's line of a group's table.
Import it
import type { GroupRow } from "@johnmorrisdotca/taisen-brackets";
Definition
interface GroupRow {
team: Team;
played: number;
won: number;
drawn: number;
lost: number;
goalsFor: number;
goalsAgainst: number;
diff: number;
points: number;
}
Members
| Name | Type | Description |
|---|---|---|
team | Team | |
played | number | |
won | number | |
drawn | number | |
lost | number | |
goalsFor | number | |
goalsAgainst | number | |
diff | number | Goals for minus goals against. |
points | number | Three for a win, one for a draw. |
Examples
import { groupStandings, type GroupRow } from "@johnmorrisdotca/taisen-brackets";
const teams = [{ id: "A", name: "Aurora", group: "A" }, { id: "B", name: "Harbour", group: "A" }];
const [group] = groupStandings({ teams, matchups: [{ sides: ["A", "B"], score: [2, 1], round: 0 }] });
const top: GroupRow = group.rows[0];
console.log(top.team.name, top.points, top.diff);Aurora 3 1What it prints (run when this page was built)