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.
The type of the contained values
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
undefined
T
The single value held by values
values
TypeError When values holds no value or more than one
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.