Option, Some and None, as ts-results-es defines them, which an
optional request and a typed read of the data bag give.
Some(value) holds what is present, a stored null included, and None
says that nothing is, so the two can never be confused. Import them only
from itinera: an ESM application importing them from ts-results-es
directly gets a second copy of their types, which does not type-check
against itinera's. Their methods, such as unwrapOr and map, are
documented by
ts-results-es.
importassertfrom"node:assert/strict"; import { None, typeOption, Some } from"itinera/option";
Option,SomeandNone, asts-results-esdefines them, which an optional request and a typed read of the data bag give.Some(value)holds what is present, a storednullincluded, andNonesays that nothing is, so the two can never be confused. Import them only from itinera: an ESM application importing them fromts-results-esdirectly gets a second copy of their types, which does not type-check against itinera's. Their methods, such asunwrapOrandmap, are documented by ts-results-es.