Reference · Tiles, Mexican Train and replay
CliSurroundingstype
What the command line is run in. All of it is optional.
Import it
import type { CliSurroundings } from "@johnmorrisdotca/domino";
Definition
type CliSurroundings = {
env?: Record<string, string | undefined>;
stdin?: string;
locale?: string;
random?: () => number;
};
Members
| Name | Type | Description |
|---|---|---|
env (optional) | Record<string, string | undefined> | undefined | The environment, for the language: |
stdin (optional) | string | undefined | Standard input, when |
locale (optional) | string | undefined | The system's language where the environment names none: what |
random (optional) | (() => number) | undefined | Where a seed comes from when none is given: a function like |
Examples
import type { CliSurroundings } from "@johnmorrisdotca/domino";
import { seededRandom } from "@johnmorrisdotca/domino";
const value: CliSurroundings = {locale:"ja-JP",random:seededRandom(42)};
console.log(value);{ locale: 'ja-JP', random: [Function (anonymous)] }What it prints (run when this page was built)