import * as ahh from "https://deno.land/x/ahh@v0.14.0/src/option.ts";
Optionals.
The Option
type defined here is nothing special, it's the same as
what the rest of the ecosystem already uses. Thanks to this, we still benefit
from the built-in language features for nullish types, such as:
- nullish coalescing (
??
and??=
); and, - optional chaining (
?.
).
Functions
Returns whether | |
Returns whether | |
f map | Returns the result of |
Returns the values of | |
f zip | Returns the values of |
Type Aliases
T None | A value that is [nullish]; either |
A value that is either | |
T Some | A value that is non-[nullish]. |