Relationship with ts-results¶
This package is a friendly fork of the excellent https://github.com/vultix/ts-results/ created due to time constraints on our (Lune’s) side – we needed a package available with some fixes.
Notable changes compared to the original package:
Added ESM compatibility
Optiongained extra methods:mapOr(),mapOrElse(),or(),orElse()Resultalso gained extra methods:mapOr(),mapOrElse(),expectErr(),or(),orElse()OkandErrno longer have thevalproperty – it’sOk.valueandErr.errornowThere is
Some.valuewhich replacedSome.valBoolean flags were replaced with methods:
Option.some->Option.isSome()Option.none->Option.isNone()Result.ok->Result.isOk()Result.err->Result.isErr()
We’ll try to get the changes merged into the upstream package so that this fork can become obsolete.