kumimojiRefusal関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A refusal: { ok: false }, the English reason (the clause of the code with the values in its gaps), the code
and the values.
インポート
import { kumimojiRefusal } from "@johnmorrisdotca/kumimoji";
定義
function kumimojiRefusal(code: KumimojiCheckCode, values?: KumimojiCheckValues): Extract<KumimojiCheck, { ok: false; }>
引数
| 名前 | 型 | 説明 |
|---|---|---|
code | "no-hand" | "givens-not-bag" | "wild-count-wrong" | "bag-exceeds-set" | "answer-not-grid" | "grid-not-the-bag" | "tiles-apart" | "not-a-word" | "grid-not-finished" | Why the grid is not taken. |
values (省略可) | Readonly<Record<string, string | number>> | undefined | What fills the clause's gaps, where it has any. |
戻り値
{ ok: false; reason: string; code: KumimojiCheckCode; values?: KumimojiCheckValues; }
The refusal checkKumimoji gives.
例
import { kumimojiRefusal } from "@johnmorrisdotca/kumimoji";
console.log(kumimojiRefusal("not-a-word", { word: "aow" }));{
ok: false,
reason: 'aow is not in the word list',
code: 'not-a-word',
values: { word: 'aow' }
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。