MedalTableSource型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A medal table to draw: the title, the sport or event, the date, the source and the rows.
インポート
import type { MedalTableSource } from "@johnmorrisdotca/taisen-brackets";
定義
interface MedalTableSource {
title?: string;
subtitle?: string;
date?: string;
source?: string;
rows: readonly MedalRow[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
title (省略可) | string | undefined | The heading. Default: the language's "Medal table". |
subtitle (省略可) | string | undefined | The sport, event or Games as a pill under the heading ("Men's judo +100 kg"). |
date (省略可) | string | undefined | The date or the edition, at the right of the heading. |
source (省略可) | string | undefined | Where the numbers come from, small at the foot. |
rows | readonly MedalRow[] |
例
import { medalTable, type MedalTableSource } from "@johnmorrisdotca/taisen-brackets";
const source: MedalTableSource = { subtitle: "Men's judo +100 kg", rows: [
{ name: "France", flag: "FR", gold: 6, silver: 1, bronze: 3 },
{ name: "Japan", flag: "JP", gold: 5, silver: 3, bronze: 2 },
] };
console.log(medalTable(source).includes("France"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。