SavedStream型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A stream's position as toJSON writes it.
インポート
import type { SavedStream } from "@johnmorrisdotca/tane";
定義
type SavedStream = {
format: typeof SAVE_FORMAT;
generator: string;
algorithm: "mulberry32";
seed: number;
draws: number;
state: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
format | 1 | The shape of this object: |
generator | string | What wrote it, such as |
algorithm | "mulberry32" | The algorithm. Always |
seed | number | |
draws | number | |
state | number | The generator's state at that position: |
例
import type { SavedStream } from "@johnmorrisdotca/tane";
import { savedStream } from "@johnmorrisdotca/tane";
const value: SavedStream = savedStream({ seed: 42, draws: 3 });
console.log(value.state);1199730185出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。