If you have @typescript on your “Must check it out” list and aren’t sure when/how to start. I have a few tips, if you want.

Follow the 🧵
1: #javascript with Type-Safety

Add a `tsconfig.json` to your JS codebase and in `compilerOptions` set `allowJs` to `true`

You can incrementally adopt #typescript as you go.
2: Don‘t be afraid of `any`

`any` is your escape-hatch. You give up type-safety and auto completion. So avoid it.

✨but✨ if you find yourself on one of those pickles where your code can‘t compile and you can‘t find the accurate type. Go for it. Live to fight another day.
3: Don‘t be shy of dodging integrations 🧐

Certain methods are harder to strong-type than others.

Going back to step 1. Don‘t be embarrassed to elude one file while you‘re getting your feet into the water.
4: Community has your back 💪

Even JS libs and APIs have types available on NPM. Be hesitant to reinvent the wheel and adding types to third-parties. You‘re probably a few google searches away from finding exactly what you need.
If this helped you, you might want to watch/subscribe to Scope Leak

https://www.youtube.com/channel/UCfCr8kE8AL0tzDPbX1KX_gg

Simplified TS is a series of short videos to get you up and running quickly and fearlessly with #TypeScript

❓Did I forget something?
Let me know in the replies below!!
thank you @naren_dev_ for sparking the motivation to this thread!! ❤️
You can follow @AtilaFassina.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: