DEV Community

Discussion on: Downsides of TypeScript?

andreidascalu profile image
Andrei Dascalu • Edited on

Also, it's a superset of JS that helps with some typing problems but not all and it does carry downsides.

'any' basically disables the typecheck altogether. Not sure why it's even there as it has the potential to mess things up badly.

It can lead to an unjustified false sense of security in typing, which is why linters have emerged as must-have tools, yet another tool in the toolchain but one that goes beyond its definition (it's not just linting but doing more complex static analysis)

rammina profile image
Rammina Author

Explicit 'any' can help with third-party libraries with really bad typedef or no typedef.

Sometimes, you just need to move on with the development process, while keeping in mind the consequences of using explicit 'any'.

andreidascalu profile image
Andrei Dascalu

Yes, but that thing gets obscured in time, leading to hidden risks made worse by people coming in later to see typescript and think "oh, it's ok". I can keep in mind what I did and group decisions to an extent but we all know long term docs are a pipe dream.
So yeah, it requires careful evaluation of long term risks