Skip to content

v0.54.0

Choose a tag to compare

@github-actions github-actions released this 03 Nov 11:04
· 256 commits to main since this release
4ad9d13

Minor Changes

  • #476 9d5028c Thanks @mattiamanzati! - Add unknownInEffectCatch diagnostic to warn when catch callbacks in Effect.tryPromise, Effect.tryMap, or Effect.tryMapPromise return unknown or any types. This helps ensure proper error typing by encouraging developers to wrap unknown errors into Effect's Data.TaggedError or narrow down the type to the specific error being raised.

    Example:

    // ❌ Will trigger diagnostic
    const program = Effect.tryPromise({
      try: () => fetch("http://something"),
      catch: (e) => e, // returns unknown
    });
    
    // ✅ Proper typed error
    class MyError extends Data.TaggedError("MyError")<{ cause: unknown }> {}
    
    const program = Effect.tryPromise({
      try: () => fetch("http://something"),
      catch: (e) => new MyError({ cause: e }),
    });

Patch Changes

  • #475 9f2425e Thanks @mattiamanzati! - Fix TSC patching mode to properly filter diagnostics by module name. The reportSuggestionsAsWarningsInTsc option now only affects the TSC module and not the TypeScript module, preventing suggestions from being incorrectly reported in non-TSC contexts.