@metreeca/core - v0.10.0
    Preparing search index...

    Function required

    • Reduces a Some value to the single value it must hold.

      Converts a flexible input into a plain value where the call site expects exactly one, so the expectation is stated once and broken inputs fail at the boundary rather than downstream.

      Type Parameters

      • T

        The type of the contained values

      Parameters

      • values: Some<T>

        The value to reduce: undefined, a single T, or a collection of T drawn from exactly once, so single-pass iterators are safe to pass

      Returns T

      The single value held by values

      TypeError When values holds no value or more than one