KeyReading型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a key means: a turn, a depth for the next face letter, or nothing.
インポート
import type { KeyReading } from "@johnmorrisdotca/kyuubu";
定義
type KeyReading = {
move: CubeMove;
} | {
depth: number;
} | null;
例
import type { KeyReading } from "@johnmorrisdotca/kyuubu";
import { readKey } from "@johnmorrisdotca/kyuubu";
const value: KeyReading = readKey("r", false, 3, 1);
console.log(value);{ move: { axis: 0, layer: 2, turns: 3 } }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。