/** * Pick one item uniformly at random from `items` using `rng` (a `() => number` in `[0, 1)`); returns undefined when empty. * * @capability weighted-pick pick one item from a set with an injected random source */ export declare function pickUniform(rng: () => number, items: readonly T[]): T | undefined; /** Pick one item with probability proportional to `weightOf(item)`; skips non-positive weights, returns undefined when nothing is eligible. */ export declare function pickWeighted(rng: () => number, items: readonly T[], weightOf: (item: T) => number): T | undefined;