- one<T>(source: ArrayLike<T>, throwIfEmpty: true): T
-
Parameters
-
source: ArrayLike<T>
-
throwIfEmpty: true
Returns T
- one<T>(source: ArrayLike<T>, throwIfEmpty?: boolean): T | undefined
-
Parameters
-
source: ArrayLike<T>
-
Optional
throwIfEmpty: boolean
Returns T | undefined
Returns random value from an array.