Why Effect?
Effect transforms how you write TypeScript applications by providing a complete toolkit for managing side effects and complex application logic:Type-Safe Error Handling
Track errors at the type level and handle them explicitly, eliminating unexpected runtime failures.
Structured Concurrency
Built-in fiber-based concurrency with automatic resource cleanup and interruption handling.
Dependency Injection
Type-safe dependency management through Context and Layer, making testing and composition effortless.
Resource Safety
Automatic resource acquisition and release with Scope, ensuring no leaks even on failures.
Your First Effect Program
Here’s a simple example showcasing Effect’s generator-based syntax with built-in error handling:yield*.
Core Concepts
TheEffect<A, E, R> type represents a computation that:
- Succeeds with a value of type
A - Fails with an error of type
E - Requires a context of type
R
Get Started
Quickstart
Build your first Effect application in 5 minutes
Installation
Complete setup guide with TypeScript configuration
What You’ll Learn
Effect is more than a library—it’s a comprehensive approach to building TypeScript applications:- Error Management: Never lose track of errors with type-level error tracking
- Concurrency Primitives: Fibers, queues, semaphores, and more for safe concurrent programming
- Resource Management: Automatic cleanup with
acquireReleaseandScope - Dependency Injection: Context and Layer for modular, testable code
- Observability: Built-in tracing, metrics, and structured logging
- Data Validation: Schema for runtime type validation and transformation
Effect requires TypeScript 5.4 or newer with strict mode enabled. See the Installation guide for complete setup instructions.