← Videos

Series · 13 parts

Effect fixes your TypeScript

A series on the bugs you already ship in plain TypeScript, and how Effect makes them impossible to write. Functions that hide how they fail, try/catch that swallows every error’s name, retry loops with three bugs, Promise.all that floods your own API, timeouts that cancel nothing, leaked database connections, unchecked casts, and environment variables that turn into NaN.

Each part is one bug and one fix, side by side, in about a minute. It starts from async/await, so you need no Effect background, and it ends with the honest part: when you should not use Effect at all.

  1. IntroAn Effect is not a Promise. It's a blueprint.
  2. Part 1Your TypeScript functions are lying to you
  3. Part 2try/catch is a goto in disguise
  4. Part 3If you can write async/await, you can write Effect
  5. Part 4Your retry loop has 3 bugs
  6. Part 5Promise.all just DDoSed your own API
  7. Part 6Your timeout doesn't cancel anything
  8. Part 7You don't need a DI framework
  9. Part 8You're leaking database connections
  10. Part 9"as User" is not validation
  11. Part 10process.env.PORT is string | undefined
  12. Part 11Free tracing, no glue code
  13. Part 12When you should NOT use Effect