konfeti - v0.6.0
    Preparing search index...

    Type Alias Weighted<T>

    Value with Pick Weight. Used in lists to make some entries appear more often. Plain (non-weighted) entries count as weight 1.

    form: ["rect", { value: "circle", weight: 3 }] // circles are 3× as common as rects
    
    type Weighted<T> = {
        value: T;
        weight: number;
    }

    Type Parameters

    • T
    Index
    value: T

    Entry Value.

    weight: number

    Relative Pick Weight. Must be > 0.

    1