Skip to content

v0.45.1

Choose a tag to compare

@github-actions github-actions released this 16 Oct 07:11
· 302 commits to main since this release
b3ab2a2

Patch Changes

  • #423 70d8734 Thanks @mattiamanzati! - Add code fix to rewrite Schema class constructor overrides as static 'new' methods

    When detecting constructor overrides in Schema classes, the diagnostic now provides a new code fix option that automatically rewrites the constructor as a static 'new' method. This preserves the custom initialization logic while maintaining Schema's decoding behavior.

    Example:

    // Before (with constructor override)
    class MyClass extends Schema.Class<MyClass>("MyClass")({ a: Schema.Number }) {
      b: number;
      constructor() {
        super({ a: 42 });
        this.b = 56;
      }
    }
    
    // After (using static 'new' method)
    class MyClass extends Schema.Class<MyClass>("MyClass")({ a: Schema.Number }) {
      b: number;
      public static new() {
        const _this = new this({ a: 42 });
        _this.b = 56;
        return _this;
      }
    }
  • #421 8c455ed Thanks @mattiamanzati! - Update dependencies to their latest versions including Effect 3.18.4, TypeScript 5.9.3, and various ESLint and build tooling packages