github Effect-TS/effect effect@3.14.22

latest releases: @effect/workflow@0.9.3, @effect/platform@0.90.7, effect@3.17.13...
3 months ago

Patch Changes

  • #4847 24a9ebb Thanks @gcanti! - Schema: TaggedError no longer crashes when the message field is explicitly defined.

    If you define a message field in your schema, TaggedError will no longer add its own message getter. This avoids a stack overflow caused by infinite recursion.

    Before

    import { Schema } from "effect"
    
    class Todo extends Schema.TaggedError<Todo>()("Todo", {
      message: Schema.optional(Schema.String)
    }) {}
    
    // ❌ Throws "Maximum call stack size exceeded"
    console.log(Todo.make({}))

    After

    // ✅ Works correctly
    console.log(Todo.make({}))

Don't miss a new effect release

NewReleases is sending notifications on new releases.