github Effect-TS/effect @effect/schema@0.75.5

19 hours ago

Patch Changes

  • #3792 382556f Thanks @gcanti! - resolve parse error when using pick with union of class schemas, closes #3751

  • #3790 97cb014 Thanks @gcanti! - Equivalence: Fixed a bug related to discriminated tuples.

    Example:

    The following equivalence check was incorrectly returning false:

    import * as E from "@effect/schema/Equivalence"
    import * as S from "@effect/schema/Schema"
    
    // Union of discriminated tuples
    const schema = S.Union(
      S.Tuple(S.Literal("a"), S.String),
      S.Tuple(S.Literal("b"), S.Number)
    )
    
    const equivalence = E.make(schema)
    
    console.log(equivalence(["a", "x"], ["a", "x"]))
    // false

Don't miss a new effect release

NewReleases is sending notifications on new releases.