Repository navigation
v0.52.0
Minor Changes
-
#460
1ac81a0Thanks @mattiamanzati! - Add new diagnosticcatchUnfailableEffectto warn when using catch functions on effects that never failThis diagnostic detects when catch error handling functions are applied to effects that have a
nevererror type (meaning they cannot fail). It supports all Effect catch variants:Effect.catchAllEffect.catchEffect.catchIfEffect.catchSomeEffect.catchTagEffect.catchTags
Example:
// Will trigger diagnostic const example = Effect.succeed(42).pipe( Effect.catchAll(() => Effect.void) // <- Warns here ); // Will not trigger diagnostic const example2 = Effect.fail("error").pipe( Effect.catchAll(() => Effect.succeed(42)) );
The diagnostic works in both pipeable style (
Effect.succeed(x).pipe(Effect.catchAll(...))) and data-first style (pipe(Effect.succeed(x), Effect.catchAll(...))), analyzing the error type at each position in the pipe chain. -
#458
372a9a7Thanks @mattiamanzati! - Refactor TypeParser internals to use symbol-based navigation instead of type-based navigationThis change improves the reliability and performance of the TypeParser by switching from type-based navigation to symbol-based navigation when identifying Effect, Schema, and other Effect ecosystem APIs. The new implementation:
- Uses TypeScript's symbol resolution APIs to accurately identify imports and references
- Supports package name resolution to verify that identifiers actually reference the correct packages
- Implements proper alias resolution for imported symbols
- Adds caching for source file package information lookups
- Provides new helper methods like
isNodeReferenceToEffectModuleApiandisNodeReferenceToEffectSchemaModuleApi
This is an internal refactoring that doesn't change the public API or functionality, but provides a more robust foundation for the language service features.