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
}