Repository navigation
v0.54.0
Minor Changes
-
#476
9d5028cThanks @mattiamanzati! - AddunknownInEffectCatchdiagnostic to warn when catch callbacks inEffect.tryPromise,Effect.tryMap, orEffect.tryMapPromisereturnunknownoranytypes. This helps ensure proper error typing by encouraging developers to wrap unknown errors into Effect'sData.TaggedErroror 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
9f2425eThanks @mattiamanzati! - Fix TSC patching mode to properly filter diagnostics by module name. ThereportSuggestionsAsWarningsInTscoption now only affects the TSC module and not the TypeScript module, preventing suggestions from being incorrectly reported in non-TSC contexts.