Skip to content

1.0.1 Fixes non Discriminating Errors

Latest
Compare
Choose a tag to compare
@ybabts ybabts released this 07 Jul 23:18
· 1 commit to main since this release

This release fixes an issue with how isErr was discriminating between Error types and the value of the Result type. Typescript effectively saw any object with the name and message property to be an Error type rather than the value of the Result type. To fix this, a symbol has been added to the global namespace of the Error interface. This allows all types to be discriminated from types that extend from the Error type.

Full Changelog: 1.0.0...1.0.1