We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think it would be nice to overload Math.random
function random(): number function random(opts: EmptyObject): number function random(opts: { seed: number }): RandomNumberGenerator interface RandomNumberGenerator { next: () => number fork: () => RandomNumberGenerator } type EmptyObject = Record<string, never>
The text was updated successfully, but these errors were encountered:
Also note fork here will create a new RNG which is predictably forked from the current one. ie does something like
… fork = () => random({ seed: this.next() }) …
Sorry, something went wrong.
No branches or pull requests
I think it would be nice to overload Math.random
The text was updated successfully, but these errors were encountered: