mwg API
    Preparing search index...

    Function weightedKey

    • a key from weights, drawn in proportion to the value it maps to, or null if none has any

      Type Parameters

      • K

      Parameters

      • weights: ReadonlyMap<K, number>

      Returns K | null