You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the previous version of ts-pattern (prior to v5), the Branded Types feature was working correctly and as intended. However, after updating to v5.0.1, it seems that the Branded Types are no longer functioning as expected.
in (4.0.6) it's working correctly and will narrow type to primitive type when matching but after this version it needs PatternMatcher .
TS-Pattern v4 used to support branded types, usually defined as an intersection
between a literal type (like `number` or `string`) and an object containing a unique symbol.
There is a bug in v5 that prevents people from using branded types as patterns and this PR fixes it.
This closes issue #167 and #178.
Describe the bug
In the previous version of ts-pattern (prior to v5), the Branded Types feature was working correctly and as intended. However, after updating to v5.0.1, it seems that the Branded Types are no longer functioning as expected.
in (4.0.6) it's working correctly and will narrow type to primitive type when matching but after this version it needs PatternMatcher .
Code Sandbox with a minimal reproduction case
https://codesandbox.io/p/sandbox/modern-tdd-xly9tj
Versions
The text was updated successfully, but these errors were encountered: