I Stopped Throwing Errors and My Code Finally Works
summary
Effect is a TypeScript library that makes errors part of the type so functions declare exact failure types (e.g., BoardNotFound | DBError | NotifyFailed), uses generators instead of promises, and unlocks retries in 3 lines with an exponential jitter policy. A live migration of an open source app (≈80 files changed) proves it works: tests run instantly because time is a value you can control via a test clock, and the compiler refuses to run code without provided dependencies.
AI-written summary · about
chapters (12)
- 0:00Introduction and problem
- 4:23Kanio project background
- 7:34Effect library basics
- 10:46Expected vs unexpected errors
- 11:51Generators vs promises
- 13:14Error handling with Effect
- 14:39Retry policies in Effect
- 15:42Testing with virtual time
- 17:05Dependency injection
- 18:53Migration experience
- 19:35Conclusion and call to action
- 19:56Q&A session
