Reference · Draw a bracket, a table or a road to the final
MatchupSourcetype
A matchup to draw: the two athletes with their ranks and points, and their earlier meetings.
Import it
import type { MatchupSource } from "@johnmorrisdotca/taisen-brackets";
Definition
interface MatchupSource {
title?: string;
category?: string;
date?: string;
source?: string;
a: RankingEntry;
b: RankingEntry;
meetings?: readonly RankingMeeting[];
}
Members
| Name | Type | Description |
|---|---|---|
title (optional) | string | undefined | The heading. Default: the language's "Head to head". |
category (optional) | string | undefined | The category as a pill under the heading ("U18 · Men -60 kg"). |
date (optional) | string | undefined | The event or the date, at the right of the heading. |
source (optional) | string | undefined | Where the data comes from, small at the foot. |
a | RankingEntry | The two athletes: an entry's |
b | RankingEntry | |
meetings (optional) | readonly RankingMeeting[] | undefined | The previous meetings, in the order they are to be written (the latest first, as a broadcast does). |
Examples
import { rankingMatchup, type MatchupSource } from "@johnmorrisdotca/taisen-brackets";
const source: MatchupSource = {
category: "U18 · Men -60 kg",
a: { name: { surname: "Nakamura", given: "Kenji" }, rank: 1, points: 412.5 },
b: { name: { surname: "Brar", given: "Harpreet" }, rank: 2, points: 398 },
meetings: [
{ date: "2026-09-13", event: "Fall Open", round: "Semi-final", winner: 0, result: "ippon · 2:11" },
{ date: "2026-05-17", event: "Spring Classic", round: "Final", winner: 1, result: "waza-ari · golden score" },
],
};
console.log(rankingMatchup(source).includes("PREVIOUS MEETINGS"));trueWhat it prints (run when this page was built)