presetByName関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The preset a site's printed name leads to, or undefined. Case and spacing around the name do not matter.
インポート
import { presetByName } from "@johnmorrisdotca/sugoroku";
定義
function presetByName(name: string): Preset | undefined
引数
| 名前 | 型 | 説明 |
|---|---|---|
name | string | The colour property, preset name or sound identifier specified by this signature. |
戻り値
Preset | undefined
The matching preset, or undefined for an unknown name.
例
import { presetByName } from "@johnmorrisdotca/sugoroku";
console.log(presetByName("backgammon")?.key);backgammon出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。