ResultsRow型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One line of a results board. Only name is needed.
インポート
import type { ResultsRow } from "@johnmorrisdotca/taisen-brackets";
定義
interface ResultsRow {
name: string | RankingName;
rank?: number | string;
code?: string;
flag?: string;
mark?: string;
values?: readonly (number | string | null)[];
record?: string | readonly string[];
note?: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
name | string | RankingName | The name as it is to be written ("A. SACRAMONE", "Svetlana Khorkina"), or its two parts (set by |
rank (省略可) | string | number | undefined | The rank: a number, or a text ("=3", "DQ"). Left out, the place in the list (equal results share one, see |
code (省略可) | string | undefined | The country's three letters, written before the flag. |
flag (省略可) | string | undefined | A code for the |
mark (省略可) | string | undefined | A mark of your own (an image address or inline SVG) in place of a flag. |
values (省略可) | readonly (string | number | null)[] | undefined | One value for each column: a number (written to the column's |
record (省略可) | string | readonly string[] | undefined | A record badge or several beside the last value: |
note (省略可) | string | undefined | Written in place of the values when there are none to show: |
例
import { resultsBoard, type ResultsRow } from "@johnmorrisdotca/taisen-brackets";
const row: ResultsRow = { code: "USA", flag: "US", name: "Michael Phillips", values: [50.58], record: "OR" };
console.log(resultsBoard({ title: "Final", rows: [row] }).includes("50.58"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。