UNPKG

765 BTypeScriptView Raw
1import { Distribution } from "../types";
2/**
3 * Returns a boolean Distribution with 50% probability of being true or false
4 */
5export declare function bool(): Distribution<boolean>;
6/**
7 * Returns a boolean Distribution with the provided `percentage` of being true
8 * @param percentage A number within [0, 1] of how often the result should be `true`
9 */
10export declare function bool(percentage: number): Distribution<boolean>;
11/**
12 * Returns a boolean Distribution with a probability of
13 * `numerator` divided by `denominator` of being true
14 * @param numerator The numerator of the probability
15 * @param denominator The denominator of the probability
16 */
17export declare function bool(numerator: number, denominator: number): Distribution<boolean>;