CustomFace型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One face of a custom die: what it says, what it is worth in a total if it is worth anything, and a colour for it. The words are text and only ever shown as text.
インポート
import type { CustomFace } from "@johnmorrisdotca/korokoro";
定義
type CustomFace = {
label: string;
value?: number;
colour?: string;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
label | string | What the face says: 1 to |
value (省略可) | number | undefined | What it adds to a total. Left out of a face that is only words, which adds nothing. |
colour (省略可) | string | undefined | A colour for the face, as |
例
import type { CustomFace } from "@johnmorrisdotca/korokoro";
const value: CustomFace = { label: "Hit", value: 1, colour: "#2f5d4a" };
console.log(value.label);Hit出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。