1.1.16 — Compile-time get(), getErr()
- BREAKING: Modified
getnot to be callable when used onErr<T>whereTisn'tnever - Added
getErrfor 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
}