- Remove official Node 8.x compatibility (support 10.x and up). The package still will run on Node 8 LTS (with async functions), though.
- Export
Success
andFailure
types in TypeScript declarations.
- Calling
Result#enforceValue()
on a failure result now throws the failure reason instead of throwing a newTypeError
. This helps propagate underlying errors up the call stack instead of masking them withTypeError
instances that don't specify what caused the failure.
enforceAsyncResult
, a function to convert promises that return results into promises that return unwrapped values or throw. This is the inverse ofasyncResult
.
Initial version of the Results API.