Skip to content

v2.6.0

Choose a tag to compare

@dmmulroy dmmulroy released this 28 Jan 13:05
1e56c99

What's Changed

Features

  • Result.deserialize now returns ResultDeserializationError instead of null (#29)

    • Adds ResultDeserializationError tagged error class
    • Result.deserialize returns Result<T, E | ResultDeserializationError> instead of Result<T, E> | null
    • Allows handling deserialization failures using the same Result utilities as everything else
  • Compile-time protection against async in Result.try (#30) by @trvswgnr

    • Prevents a footgun where Result.try silently accepts async functions
    • TypeScript now rejects async functions at compile time, guiding users toward Result.tryPromise

Fixes

  • Fix opensrc repository URL (#28)
  • Remove recursive publish script

Docs

  • Fix TaggedError example in JSDoc (#27)

Full Changelog: v2.5.2...v2.6.0