Releases: JairusSW/try-as
Releases · JairusSW/try-as
v1.0.1
1.0.1
This patch release tightens Exception rethrow semantics, improves TypeScript tooling, and adds targeted regression coverage around the new behavior.
Highlights
throw err;now lowers toerr.rethrow();whenerris statically typed asExceptionor anExceptionsubclass.- Non-
Exceptionidentifier throws still use the existing fallback path:__try_rethrow()rethrow()- raw
throw
- TypeScript consumers now see
Exception.rethrow(): neverthrough the published declaration file. - Added focused tests covering:
- typed local
Exceptionrethrows - subclass inference
as Exceptionassertions- typed parameters
- direct
Exception.rethrow()calls
- typed local
- Updated README and architecture docs to reflect the new alias behavior.
Notable Behavior Change
If you previously relied on throw err; to preserve transformed exception-state propagation while err was typed as Exception, that path now intentionally uses the runtime rethrow() behavior instead.
Full changelog
- fix: rewrite
throw errtoerr.rethrow()whenerris statically typed asException(or anExceptionsubclass), while keeping the generic identifier fallback path for non-Exceptionvalues - fix: preserve direct
Exception.rethrow()runtime behavior while exposing it asneverin the package type declarations for TS tooling - test: add focused rethrow semantics coverage for typed locals, subclass inference, assertions, typed parameters, and direct
rethrow()calls - docs: document the new typed-
Exceptionrethrow alias semantics in the README and architecture notes