max
Callable
Type parameters
- T: Traversable<ComparablePrimitive, unknown>
The element type.
Parameters
xs: T
The values to check.
Returns T extends Traversable<infer I> ? T extends readonly [unknown, ...unknown[]] ? T[number] : Maybe<I> : T
The maximum value of the traversable.
- T: Traversable<ComparablePrimitive, unknown>
Calculate the maximum value of the given items.
Example
Alternatives