Effect
Effect is a TypeScript framework that models computations as lazy, typed workflows (Effect<A, E, R>). You describe what should happen, including its possible errors and dependencies, and the runtime handles execution, concurrency, resource cleanup, and observability.
Overview
| Repo | github.com/Effect-TS/effect |
| Install | npm install effect (v3 stable) or npm install effect@rc (v4 RC) |
| TypeScript | 5.9+ with strict mode |
| Runtimes | Node.js 18+, Deno, Bun |
| License | MIT |
Contents
Concepts
- The Effect Type - The three-channel
Effect<A, E, R>type and why it matters - Generators and Yield -
Effect.gen,yield*,Effect.fn, and thereturn yield*pattern - Typed Errors -
Schema.TaggedError,Data.TaggedError, and the catch combinator family - Dependency Injection -
Context.Service,Layer, and the v4 service pattern - Structured Concurrency - Fibers,
Effect.all, concurrency options, and racing - Scope and Resources -
Effect.acquireRelease,Scope, and guaranteed cleanup
Architecture
- Runtime and Fibers - Fiber scheduler, structured concurrency model, and runtime configuration
- Layer Composition - Dependency graphs, memoization, and layer lifecycle