MatchupSource型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A matchup to draw: the two athletes with their ranks and points, and their earlier meetings.
インポート
import type { MatchupSource } from "@johnmorrisdotca/taisen-brackets";
定義
interface MatchupSource {
title?: string;
category?: string;
date?: string;
source?: string;
a: RankingEntry;
b: RankingEntry;
meetings?: readonly RankingMeeting[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
title (省略可) | string | undefined | The heading. Default: the language's "Head to head". |
category (省略可) | string | undefined | The category as a pill under the heading ("U18 · Men -60 kg"). |
date (省略可) | string | undefined | The event or the date, at the right of the heading. |
source (省略可) | string | undefined | Where the data comes from, small at the foot. |
a | RankingEntry | The two athletes: an entry's |
b | RankingEntry | |
meetings (省略可) | readonly RankingMeeting[] | undefined | The previous meetings, in the order they are to be written (the latest first, as a broadcast does). |
例
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"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。