ShiritoriPlay型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a word does to a chain.
インポート
import type { ShiritoriPlay } from "@johnmorrisdotca/kotoba";
定義
type ShiritoriPlay = {
readonly ok: true;
readonly loses: false;
readonly next: string;
} | {
readonly ok: true;
readonly loses: true;
readonly next: null;
} | {
readonly ok: false;
readonly why: ShiritoriRefusal;
};
例
import type { ShiritoriPlay } from "@johnmorrisdotca/kotoba";
const play: ShiritoriPlay = { ok: true, loses: false, next: "ら" };
console.log(play);{ ok: true, loses: false, next: 'ら' }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。