Releases: hazae41/result
Releases · hazae41/result
1.3.2 — Added getOrNull, checkOrNull and variants
1.1.16 — Compile-time get(), getErr()
- BREAKING: Modified
get
not to be callable when used onErr<T>
whereT
isn'tnever
- Added
getErr
for symmetry
Summary
The behaviour of get
now becomes fully compile-safe as it no longer returns error types
function f(result: Result<string, Error>) {
return result.get() // won't compile
}
function f(result: Result<string, never>) {
return result.get() // will compile
}
1.1.3 - .flatten()
- Added .flatten() method in Ok and Err (Result.flatten is still available as a static function)
1.1 - Minor breaking changes
BREAKING
- Renamed
Result.catchAndWrap
toResult.runAndDoubleWrap
- Renamed
Result.catchAndUnwrap
toResult.runAndUnwrap
- Removed
Result.recatch
- Moved
Debug.debug
toResult.debug
- Moved
Result.rethrow
toCatched.throwOrErr
Others
- Added
Result.flatten
- Added
Result.runAndWrap
expect
andunwrap
now havethis
ascause
Result.assert
now returns anErr<AssertError>
1.0.46 - Deps, clean
v1.0.46 1.0.46
1.0.33 - Panic
v1.0.33 1.0.33
1.0.26 - Unhandled result runtime check
v1.0.26 1.0.26
1.0.20 - Added clear()/clearErr()
v1.0.20 1.0.20
1.0.14 - Iterators
v1.0.14 1.0.14
1.0.6 - Added shorthands
v1.0.6 1.0.6