NumberOnesOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What the number-ones board can be told: the columns, the card colours, and the options of every board.
インポート
import type { NumberOnesOptions } from "@johnmorrisdotca/taisen-brackets";
定義
interface NumberOnesOptions extends BoardOptions, Shared {
columns?: number;
colors?: readonly string[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
columns (省略可) | number | undefined | Columns of cards, 1 to 4. Default: the number that makes the cards biggest. |
colors (省略可) | readonly string[] | undefined | The colour of each card's number panel, hex codes, taken in turn. The number is white or near-black, whichever reads on the colour. Default |
size (省略可) | BoardSizeName | { width: number; height: number; } | undefined | One of |
theme (省略可) | "auto" | "light" | "dark" | undefined |
|
flags (省略可) | FlagRenderer | undefined | Draws a flag from its code, as for |
flagHref (省略可) | ((code: string) => string | null | undefined) | undefined | The address of a flag as a picture to load, tried where |
flagShape (省略可) | "round" | "square" | undefined |
|
locale (省略可) | string | Locale | undefined | The language: |
words (省略可) | Partial<Words> | undefined | |
title (省略可) | string | undefined | The |
id (省略可) | string | undefined | Prefix for the drawing's ids. Default: a hash of the state and the options. |
className (省略可) | string | undefined | |
nameStyle (省略可) | "surname-first" | "given-first" | "as-is" | undefined |
|
precision (省略可) | number | undefined | Decimals for numeric points ( |
例
import { rankingNumberOnes, type NumberOnesOptions } from "@johnmorrisdotca/taisen-brackets";
const options: NumberOnesOptions = { size: "square", columns: 2, nameStyle: "given-first" };
console.log(rankingNumberOnes({ cards: [{ category: "-60 kg", entry: { name: { surname: "Nakamura", given: "Kenji" } } }] }, options).startsWith("<svg"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。