errorproperties are now
public readonlyinstead of
private. This lets the user get them directly rather than requiring a function call, once they have properly narrowed the type.
Err.unwrapErrstatic methods now exist to for nicer functional pipelines
readonlyproperty, 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
errorwherever 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.)
Just update the package!
$ yarn install firstname.lastname@example.org