Tag typescript
1 bookmark has this tag.
1 bookmark has this tag.
Effect promises to improve TypeScript code by providing a set of modules and functions that are composable with maximum type-safety.
The term “effect” refers to an effect system, which provides a declarative approach to handling side effects. Side effects are operations that have observable consequences in the real world, like logging, network requests, database operations, etc.
The library revolves around the Effect<Success, Error, Requirements> type, which can be used to represent an immutable value that lazily describes a workflow or job.
Effects are not functions by themselves, they are descriptions of what should be done. They can be composed with other effects, and they can be interpreted by the Effect runtime system.
Before we dive into the project we will build, let’s look at some basic concepts of Effect.