Tommy O'Keefe discusses his journey with TypeScript from initial skepticism to becoming a fan. He was initially confused by TypeScript but it brought clarity while reading, writing, and running code. Key benefits he cites are increased readability, self-documenting code, better IDE support, and catching type errors earlier. He recommends starting by keeping the configuration permissive and adding types progressively before tightening rules. For new projects, he emphasizes catching errors earlier and avoiding any type is the ally not the enemy mindset.
4. Why Typescript?
👉 46.6% - Have used would use again
👉 5.4% - Have used wouldn’t use again
👉 33.7% - Heard of it, want to learn
👉 13.7% - Heard of it, not interested
30. Keep Things Loose At First
Keep your config file as permissive as
possible: settings like AllowJS are
key!
31. Keep Things Loose At First
Keep your config file as permissive as
possible: settings like AllowJS are
key!
Focus on adding type annotations
that improve readability and expose
problem areas in your app
33. Tighten Things Up
Progressively add more meaningful
type definitions as you work through
your files.
Tighten up the config and linting
rules once your first pass is finished.
42. Errors Are Your Friends
No matter what kind of error you
encounter, it’s revealing an inconsistency
in your code. It’s an ally, not an enemy.
43. Type Any is not Your Friend
Get rid of it wherever you can.
44. Don’t Forget Your Config!
Many quick start guides jump right
into running tsc from the command
line. No matter how small your
project is, you need a config!
45. Use Existing Tools
Starting a React app? Angular? Vue?
Someone else has undoubtedly
already put together a great starter
repo you can use!
46. Helpful Resources
Quick Start Samples
Migrating JS to TS
TypeScript Handbook (very useful)
TypeScript Deep Dive (Basarat Ali Sayed)