What problem does it solve?
Effect-TS enables building robust TypeScript programs by modeling effects as composable, lazy workflows with typed errors and explicit dependencies. It guides you to define services via Context and Layers, manage resources safely, and compose complex I/O and concurrency patterns with predictable behavior.
Core Features & Use Cases
- Effect describes a workflow as a value: a lazy, immutable description of a computation with a Success type, an Error type, and Requirements.
- Typed error management: distinguishes expected errors from unexpected failures, enabling precise error handling with Effect.fail and related combinators.
- Services & Layers: define services via Context.Tag, create and compose Layers, and safely provide dependencies to programs.
- Resource management & concurrency: support for scoped resources, acquire/release patterns, parallel execution, and Effect.gen for generator-style workflows.
- Use cases: building decoupled, testable API clients, data pipelines, or orchestrations that require deterministic execution and strong typing.
Quick Start
Create a simple Effect program that succeeds with a value, uses a provided service through a Layer, and executes with the Effect runtime.