Skip to content

effect@3.0.3

Choose a tag to compare

@github-actions github-actions released this 19 Apr 00:02
· 2387 commits to main since this release
8ae40ac

Patch Changes

  • #2568 a7b4b84 Thanks @tim-smart! - add Match.withReturnType api

    Which 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"),
    );