Code Style
Dual APIs
Explore "data-last" and "data-first" variants of dual APIs in the Effect ecosystem, illustrated with the example of `Effect.map`. Learn how to choose between them based on your coding style and readability preferences.
Read more
Branded Types
Explore the concept of branded types in TypeScript using the Brand module. Understand the "data-last" and "data-first" variants, and learn to create branded types with runtime validation (refined) and without checks (nominal). Discover how to use and combine branded types to enforce type safety in your code.
Read more
Pattern Matching
Explore the power of pattern matching in code, simplifying complex conditions into concise expressions. Learn about exhaustiveness checking and discover how to implement pattern matching in JavaScript using the `effect/Match` module. Dive into defining matchers, patterns, predicates, and transformations for enhanced code branching and readability.
Read more
Simplifying Excessive Nesting
Learn how to simplify code with the `elapsed` function using different approaches. The guide demonstrates using plain pipe, the "do simulation," and the concise `Effect.gen` constructor to calculate and log the elapsed time for an effect's execution. Choose the method that fits your coding style and enhances code readability.
Read more
Guidelines
Guidelines
Read more