effect icon indicating copy to clipboard operation
effect copied to clipboard

`Match` pattern that should be recognized as exhaustive reports ts error

Open arekmaz opened this issue 7 months ago • 3 comments

What version of Effect is running?

3.4.6

What steps can reproduce the bug?

visit this playground url with the Match code, and corresponding working ts-pattern code to compare:

https://effect.website/play#b011033723ec

What is the expected behavior?

Match.exhaustive should not throw an error as the matchers are exhaustive

What do you see instead?

long ts error because the pattern is not recognized as exhaustive

image

Additional information

it's working correctly in the runtime, giving the same result as ts-patters just the type definition is different

arekmaz avatar Jul 08 '24 18:07 arekmaz