ResultsBoardSource型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A results board to draw: the title, the phase, the columns and the rows.
インポート
import type { ResultsBoardSource } from "@johnmorrisdotca/taisen-brackets";
定義
interface ResultsBoardSource {
title: string;
phase?: string;
columns?: readonly ResultsColumn[];
rows: readonly ResultsRow[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
title | string | The event, in capitals in the title band ("Women's apparatus final"). |
phase (省略可) | string | undefined | The phase in the sub bar ("Result", "Final", "Preliminaries"). Default: the language's "Result". |
columns (省略可) | readonly ResultsColumn[] | undefined | The score columns, left to right. Default: one column per value of the longest row, with no heading. |
rows | readonly ResultsRow[] |
例
import { resultsBoard, type ResultsBoardSource } from "@johnmorrisdotca/taisen-brackets";
const source: ResultsBoardSource = {
title: "Men's 100m butterfly",
phase: "Results · Final",
columns: [{ precision: 2 }],
rows: [
{ code: "USA", flag: "US", name: "Michael Phillips", values: [50.58], record: "OR" },
{ code: "HUN", flag: "HU", name: "Laszlo Czigany", values: [50.59] },
],
};
console.log(resultsBoard(source).includes("50.58"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。