Reference · Streams, draws and seeds
StreamPositiontype
Where a stream is: the seed it started from, and how many numbers have been drawn from it.
Import it
import type { StreamPosition } from "@johnmorrisdotca/tane";
Definition
type StreamPosition = {
readonly seed: number;
readonly draws: number;
};
Members
| Name | Type | Description |
|---|---|---|
seed | number | The seed the stream was made from, as an unsigned 32-bit integer. |
draws | number | How many numbers have been drawn: 0 for a stream nothing has been taken from. |
Examples
import type { StreamPosition } from "@johnmorrisdotca/tane";
const value: StreamPosition = { seed: 42, draws: 3 };
console.log(value.draws);3What it prints (run when this page was built)