DEV Community

Discussion on: TypeScript and why you should type your JS project

Collapse
 
johnkazer profile image
John Kazer

Could you list a few?

Collapse
 
matjones profile image
Mat Jones

Incorrect types for open source packages, happens quite often

If you’re targeting the browser... Internet Explorer

Generics not working the way you expect them to in certain scenarios

There’s lots. It’s also just a superset of JavaScript, so any surprise JavaScript can produce, typescript can also product.

Thread Thread
 
migueldevelopez profile image
MiguelDevelopez

Thanks for sharing these points, Mat!
I'll investigate the cons of using TS 🤔

Thread Thread
 
matjones profile image
Mat Jones

Don’t get me wrong, TS is a VAST improvement over JS, but it does have its own set of “gotchas”

Thread Thread
 
migueldevelopez profile image
MiguelDevelopez

To be honest, I don't use TypeScript yet, I just found it very interesting and loved by the community so... for that reasons I decided to write this, but I have in mind to start a little project to check his good points (and the bad ones too) 👏