RankingSource型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A ranking to draw: the title, the category, the date, the source and the entries.
インポート
import type { RankingSource } from "@johnmorrisdotca/taisen-brackets";
定義
interface RankingSource {
title?: string;
category?: string;
date?: string;
source?: string;
entries: readonly RankingEntry[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
title (省略可) | string | undefined | The heading. Default: the language's word for ranking. |
category (省略可) | string | undefined | The category as a line under the heading ("U18 · Men -60 kg"; |
date (省略可) | string | undefined | The date or period of the list, at the right of the heading ("October 2026"). |
source (省略可) | string | undefined | Where the list comes from, small at the foot ("Source: BC Judo"). |
entries | readonly RankingEntry[] |
例
import { rankingList, type RankingSource } from "@johnmorrisdotca/taisen-brackets";
const source: RankingSource = { category: "U18 · Men -60 kg", date: "October 2026", entries: [
{ name: { surname: "Nakamura", given: "Kenji" }, club: "Coastal Pine Judo", flag: "CA-BC", points: 412.5, change: 1 },
{ name: { surname: "Brar", given: "Harpreet" }, club: "Salmonberry Judo Club", flag: "CA-BC", points: 398, change: -1 },
{ name: { surname: "Leclerc", given: "Mathieu" }, club: "Kestrel Valley Judo", flag: "CA-QC", points: 366.25, change: 4 },
] };
console.log(rankingList(source).includes("U18 · Men -60 kg"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。