rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
20 lines (18 loc) • 387 B
text/typescript
import { IRandomNumberGenerator } from "./i-random-number-generator.js";
/**
* @public
* Instead of returning a random number, return the constant instead.
*/
export class NotRandomGenerator implements IRandomNumberGenerator
{
public constructor
(
private readonly value: number
)
{
}
public getNext(): number
{
return this.value;
}
}