DEV Community

Discussion on: TypeScript is a waste of time. Change my mind.

Collapse
 
mojo2012 profile image
Matti

I think your argumentation has some serious flaws :-D:

my Sequelize database models was over 5000 lines long on its own
I know this is common in JS land, but in languages like java it is actually discouraged to use files with so much content, especially interfaces and classes.
Everything "entity" (class, interface) should be in it's own file imho, named after the entity's name + .extension.

If your function is actually not defining a return type, defining this type/interface is useless, I give you that. But you should actually define the return type! Then your IDE can assist you at the call site with some contextual help.

If you are the sole maintainer of a codebase, 60000 loc might be possible to handle. If you are in a team of >5, it's not (except you are clones and think exactly the same way ...).