Reference · Rules, tiles and records
readSettingsfunction
A game's settings as something outside this browser sent them — a table on several devices, a kept game — checked, or null.
Import it
import { readSettings } from "@johnmorrisdotca/kumimoji";
Definition
function readSettings(value: unknown): PartySettings | null
Parameters
| Name | Type | Description |
|---|---|---|
value | unknown | The unknown setup value to interpret. |
Returns
PartySettings | null
A game's settings as something outside this browser sent them — a table on several devices, a kept game — checked, or null.
Examples
import { readSettings } from "@johnmorrisdotca/kumimoji";
const settings = {size:3,level:"hard",seed:44,gameLength:"short",language:"english",doubleSet:false,diagonals:false,hints:false} as const;
console.log(readSettings(settings));{
size: 3,
level: 'hard',
seed: 44,
gameLength: 'short',
language: 'english',
doubleSet: false,
diagonals: false,
hints: false
}What it prints (run when this page was built)