github Effect-TS/effect effect@3.0.3

latest releases: @effect/opentelemetry@0.37.5, @effect/rpc-http@0.38.3, @effect/vitest@0.10.5...
5 months ago

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

Don't miss a new effect release

NewReleases is sending notifications on new releases.