Functions
isOption
isOption<
T
>(input
):input is Option<T>
Checks whether the given value is an Option.
This function determines whether an input follows the Option<T>
structure.
Type Parameters
Type Parameter | Default type | Description |
---|---|---|
T | unknown | The type of the contained value. |
Parameters
Parameter | Type | Description |
---|---|---|
input | unknown | The value to check. |
Returns
input is Option<T>
true
if the value is an Option, false
otherwise.
Example
Checking for Option
values.