Skip to content

@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

PropertyTypeDescriptionDefined in
weightnumberThe numeric weight assigned to the object.src/random-weighted-pick.ts:13