DEV Community

Discussion on: Is 2019 the year of TypeScript?

Collapse
 
jvanbruegge profile image
Jan van Brügge

The main problem with typescript is that it is becoming a hack upon another hack. The types get very long and the compiler has problems with them (I was able to let the type checker run into an infinite loop aka a stack overflow).

Typescript the idea is great, but the execution is lacking
Still worlds better than untyped js though

Collapse
 
seangwright profile image
Sean G. Wright • Edited

I've worked with Typescript for 4 years now on large and small projects, creating my own custom types and using typed and untyped libraries.

I've never run into a case where I had an infinite loop that caused a stack overflow of the Typescript language service or compiler.

I'm not saying it can't happen, but, based on my personal experience, I can't see this as being a "con" for the language.

I can make any compiler blow up with specially crafted code - that's just programming.

If your types are getting very long (I'm assuming because of complex generics), then you can use type aliases to rename them to something shorter...

Or maybe your system complexity is showing itself in the type annotations.