MountOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Initial game, appearance, control, and lifecycle callbacks for a mounted board.
インポート
import type { MountOptions } from "@johnmorrisdotca/jirai/play";
定義
type MountOptions = DrawOptions & {
settings?: Settings;
progress?: string;
controls?: boolean;
onChange?: (game: Game) => void;
onFinish?: (game: Game) => void;
onError?: (error: Error) => void;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
material (省略可) | Material | undefined | |
pieces (省略可) | Pieces | undefined | |
language (省略可) | Language | undefined | |
hint (省略可) | number | null | undefined | |
settings (省略可) | Settings | undefined | |
progress (省略可) | string | undefined | |
controls (省略可) | boolean | undefined | |
onChange (省略可) | ((game: Game) => void) | undefined | |
onFinish (省略可) | ((game: Game) => void) | undefined | |
onError (省略可) | ((error: Error) => void) | undefined |
例
import type { Settings } from "@johnmorrisdotca/jirai";
import type { MountOptions } from "@johnmorrisdotca/jirai/play";
const settings: Settings={width:3,height:3,mines:1,grid:"square",noGuess:false,opening:"clear",seed:42};
const value: MountOptions = {settings,language:"ja",material:"wood",pieces:"flags"};
console.log(value);{
settings: {
width: 3,
height: 3,
mines: 1,
grid: 'square',
noGuess: false,
opening: 'clear',
seed: 42
},
language: 'ja',
material: 'wood',
pieces: 'flags'
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。