Patch Changes
-
#2568
a7b4b84
Thanks @tim-smart! - add Match.withReturnType apiWhich can be used to constrain the return type of a match expression.
import { Match } from "effect"; Match.type<string>().pipe( Match.withReturnType<string>(), Match.when("foo", () => "foo"), // valid Match.when("bar", () => 123), // type error Match.else(() => "baz"), );