Create a Maybe instance which is a Nothing.
Maybe
Nothing
If you want to create an instance with a specific type, e.g. for use in a function which expects a Maybe<T> where the <T> is known but you have no value to give it, you can use a type parameter:
Maybe<T>
<T>
const notString = Maybe.nothing<string>(); Copy
const notString = Maybe.nothing<string>();
Optional
An instance of Maybe.Nothing<T>.
Maybe.Nothing<T>
T The type of the item contained in the Maybe.
Generated using TypeDoc
Create a
Maybe
instance which is aNothing
.If you want to create an instance with a specific type, e.g. for use in a function which expects a
Maybe<T>
where the<T>
is known but you have no value to give it, you can use a type parameter: