Stay up to date on releases
Create your free account today to subscribe to this repository for notifications about new releases, and build software alongside 40 million developers on GitHub.
Sign up for free See pricing for teams and enterprises
chriskrycho
released this
Added
value
anderror
properties are nowpublic readonly
instead ofprivate
. This lets the user get them directly rather than requiring a function call, once they have properly narrowed the type.Just.unwrap
,Ok.unwrap
, andErr.unwrapErr
static methods now exist to for nicer functional pipelines
Removed
Nothing!
Changed
- Make
variant
areadonly
property, and properly narrow its type on the classes so comparison with it can be used to distinguish the variants directly. (Note that this could be construed as breaking, but it was a necessary invariant for the library to function at all; this is a type-system-level bugfix.) - Internally: directly use
value
orerror
wherever we were previously doing the extra function call, since the method context is the most common invocation. (The net of this is that the performance should be slightly better and using it should be slightly more idiomatic JS in the ordinary case.)
Updating
Just update the package!
$ yarn install true-myth@2.0.0