CliSurroundings型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What the command line is run in. All of it is optional.
インポート
import type { CliSurroundings } from "@johnmorrisdotca/korokoro";
定義
type CliSurroundings = {
env?: Record<string, string | undefined>;
stdin?: string;
colour?: boolean;
locale?: string;
now?: number;
source?: RandomSource;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
env (省略可) | Record<string, string | undefined> | undefined | The environment, for the language ( |
stdin (省略可) | string | undefined | Standard input, when |
colour (省略可) | boolean | undefined | Whether the output is a terminal that shows colour. |
locale (省略可) | string | undefined | The system's language where the environment names none: what |
now (省略可) | number | undefined | The time, in epoch milliseconds, for the rolls made. Now, unless given. |
source (省略可) | RandomSource | undefined | Where unseeded rolls come from. The crypto generator, unless given. |
例
import type { CliSurroundings } from "@johnmorrisdotca/korokoro";
const value: CliSurroundings = { env: {}, locale: "en" };
console.log(value.locale);en出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。