v2.6.0
What's Changed
Features
-
Result.deserializenow returnsResultDeserializationErrorinstead ofnull(#29)- Adds
ResultDeserializationErrortagged error class Result.deserializereturnsResult<T, E | ResultDeserializationError>instead ofResult<T, E> | null- Allows handling deserialization failures using the same Result utilities as everything else
- Adds
-
Compile-time protection against async in
Result.try(#30) by @trvswgnr- Prevents a footgun where
Result.trysilently accepts async functions - TypeScript now rejects async functions at compile time, guiding users toward
Result.tryPromise
- Prevents a footgun where
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