The Three Channels: Success, Error, and Requirements
Every Effect has three type channels: Effect<A, E, R> - **A**: Success type (what you get on success) - **E**: Error type (what can go wrong) - **R**: Requirements (services/dependencies needed)
The type signature documents the complete contract. In the anti-pattern, errors are untyped strings. In the Effect way, errors are typed.
- Use
Data.taggedorData.TaggedErrorto create typed errors - The error type
EinEffect<A, E, R>documents what can go wrong - Tagged errors provide better error handling and type safety
Loading code editor...