Skip to content

Releases: hazae41/result-and-option

2.1.1

Choose a tag to compare

@hazae41 hazae41 released this 10 Jun 06:28
v2.1.1
43b0241
v2.1.1

2.1.1

1.3.2 — Added getOrNull, checkOrNull and variants

Choose a tag to compare

@hazae41 hazae41 released this 14 Nov 06:32
ce7af04
v1.3.2

1.3.2

1.1.16 — Compile-time get(), getErr()

Choose a tag to compare

@hazae41 hazae41 released this 16 Jan 10:10
  • BREAKING: Modified get not to be callable when used on Err<T> where T isn't never
  • 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()

Choose a tag to compare

@hazae41 hazae41 released this 09 Sep 19:24
  • Added .flatten() method in Ok and Err (Result.flatten is still available as a static function)

1.1 - Minor breaking changes

Choose a tag to compare

@hazae41 hazae41 released this 29 Aug 16:52

BREAKING

  • Renamed Result.catchAndWrap to Result.runAndDoubleWrap
  • Renamed Result.catchAndUnwrap to Result.runAndUnwrap
  • Removed Result.recatch
  • Moved Debug.debug to Result.debug
  • Moved Result.rethrow to Catched.throwOrErr

Others

  • Added Result.flatten
  • Added Result.runAndWrap
  • expect and unwrap now have this as cause
  • Result.assert now returns an Err<AssertError>

1.0.46 - Deps, clean

Choose a tag to compare

@hazae41 hazae41 released this 13 Jun 15:30
v1.0.46

1.0.46

1.0.33 - Panic

Choose a tag to compare

@hazae41 hazae41 released this 23 May 18:05
v1.0.33

1.0.33

1.0.26 - Unhandled result runtime check

Choose a tag to compare

@hazae41 hazae41 released this 22 May 12:40
v1.0.26

1.0.26

1.0.20 - Added clear()/clearErr()

Choose a tag to compare

@hazae41 hazae41 released this 11 May 15:33
v1.0.20

1.0.20

1.0.14 - Iterators

Choose a tag to compare

@hazae41 hazae41 released this 03 May 20:01
v1.0.14

1.0.14