Effect: Typed Errors, Dependency Injection and Structured Concurrency for TypeScript
Make the hard parts of production TypeScript visible to the compiler.
Effect tracks which errors a function can fail with and which services it needs, and gives you structured concurrency, scheduling and tracing. Effect 4.x is a long-term support release.
What Effect Handles for You
The README describes Effect as helping with these problems at scale:
Failures are part of the type, so callers know what can go wrong and must handle it.
Required services appear in the type and are provided once at the edge of the app.
Concurrent work is scoped, so it can be interrupted and cleaned up safely.
Retries, schedules and tracing are built in, with an OpenTelemetry integration.
Long-Term Support Guarantees (Effect 4.x)
| Guarantee | Detail |
|---|---|
| Support period | At least three years, including bug and security fixes |
| After the next major | Bug fixes for one year, security fixes for two years |
| Breaking changes | Stable APIs break only in major releases; unstable APIs may change in minors, experimental in patches |
| Effect v3 | Lives on the v3 branch; a migration guide covers upgrading to 4.x |
Packages in the Monorepo
All released together with synchronised versions.
| Group | Packages |
|---|---|
| Core | effect |
| Platforms | @effect/platform-browser, -bun, -deno, -node, -node-shared |
| SQL | PostgreSQL, MySQL, SQL Server, ClickHouse, libSQL, Cloudflare D1, PGlite and several SQLite drivers |
| AI | @effect/ai-anthropic, -openai, -openrouter, -openai-compat, -cloudflare, -typesafe |
| UI & tooling | Atom bindings for React, Solid and Vue; OpenTelemetry; Vitest; docgen; OpenAPI and GraphQL generators |
Add Effect to a Project
npm install effect
Enable "strict": true in your tsconfig.json. Effect requires TypeScript 5.9 or newer and Node.js 22.19 or newer on Node.
npm install @effect/platform-node
npm install @effect/sql-pg
npm install -D @effect/vitest
See MIGRATION.md in the repository
When Effect Is Worth the Learning Curve
Effect changes how you write TypeScript, so it pays off most on long-running services with many failure modes, external dependencies and concurrent work. For a small script or a simple CRUD app, plain TypeScript may be enough.
Getting Help
The maintainers run a Discord, publish docs and guides at effect.website, list adoption partners for consulting and training, and invite teams to share production feedback.
Know Before You Adopt
Practical points:
- New mental model: Effect code looks different from promise-based TypeScript. Plan time for the team to learn it.
- Strict requirements: TypeScript 5.9+, strict mode and Node.js 22.19+ may require upgrades in older projects.
- Major-version migration: Moving from v3 to v4 needs the migration guide; do it deliberately, not via a blind dependency bump.
effect.website: documentation, guides, API reference and news.
MIT License.
Discord, meetups and an adoption-partner programme for commercial support.
Frequently Asked Questions
What does Effect 4.x LTS mean?
The README promises at least three years of support including bug and security fixes, bug fixes for one year after the next major version, and security fixes for two years after it. Stable APIs only break in major releases.
What do I need to use Effect?
TypeScript 5.9 or newer (7 recommended), Node.js 22.19 or newer when running on Node, and the strict flag enabled in tsconfig.json.
Can I upgrade from Effect 3?
Yes. The repository includes a migration guide for moving from 3.x to 4.x; Effect v3 code lives on the v3 branch.
Does Effect have database and AI integrations?
Yes. The monorepo includes SQL clients for PostgreSQL, MySQL, SQL Server, SQLite and others, and AI provider packages for Anthropic, OpenAI, OpenRouter and OpenAI-compatible APIs.
