DiceSet型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A set of dice with a name: a roll somebody wants to find again, such as
"Longsword" for 1d8+3 or "Skirmish" for 2d[Hit=1,Miss=0,Miss=0]. It is
kept as notation, so it holds custom and loaded dice as readily as plain
ones, and is as easy to share as to keep. Sets live on the device, in the
browser's storage: there is no account and no server.
インポート
import type { DiceSet } from "@johnmorrisdotca/korokoro";
定義
type DiceSet = {
name: string;
notation: string;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
name | string | What the set is called: 1 to |
notation | string | The dice, as notation in its one canonical spelling. |
例
import type { DiceSet } from "@johnmorrisdotca/korokoro";
import { makeSet } from "@johnmorrisdotca/korokoro";
const value: DiceSet = makeSet("Longsword", "1d8+3")!;
console.log(value.notation);1d8+3出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。