Function: some()
some<
T>(value):Option<NonNullable<T>>
Creates a Some from a given value.
Passing null or undefined returns None instead.
Type Parameters
T
T
The type of the value to wrap.
Parameters
value
T
Returns
Option<NonNullable<T>>
A Some containing the value, or None if the value is nullish.