@technobuddha > library > Random > Pick
Type Alias: Weighted
ts
type Weighted = {
weight: number;
};Defined in: random-weighted-pick.ts:9
Represents an object with an associated weight value.
This type is typically used in scenarios where items are selected based on their relative weights, such as in weighted random selection.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
weight | number | The numeric weight assigned to the object. | src/random-weighted-pick.ts:13 |