Variables
isSome
const
isSome: <T
>(option
) =>option is Some<T>
Checks whether the given Option contains a value.
This function acts as a type guard, ensuring the value is a Some.
Type Parameters
Type Parameter | Description |
---|---|
T | The type of the contained value. |
Parameters
Returns
option is Some<T>
true
if the option is a Some, false
otherwise.
Example
Checking for Some
values.