Designly
2 min readOct 21, 2023

--

I used to think the same as you about typescript. I used to use PHP as my main language and used very little JavaScript except for small front end manipulations. I decided to give typescript a try and forced myself to learn it and the more I used it the more the benefits became apparent. So I guess I had the opposite of what you experienced. Being a lone developer it actually saves me time because when I import and call a function or class, I get instant information about what parameters I can feed it and what those parameters can accept. And when you’re writing an application with thousands of files and functions, that is invaluable. You say it’s a waste of time but if you didn’t do it than you’d have to write jsdocs which to me is even more time consuming.

Also you can control the level of strictness of typescript in tsconfig just as you can with eslint. It’s totally your choice. You can have it warn or throw an exception or you can just use it to get type hints.

Bottom line is when I go back to vanilla JavaScript I feel like I’m coding in eMacs again or vi even. I just don’t see the downside of using tools that make you a more efficient coder, especially if the cost is minimal. All the type annotations are removed anyway from the transpiled code so I don’t see how it could have any bearing at runtime.

I think most of the complaints I’ve heard about typescript lately are from those who are too lazy to learn it.

--

--

Designly
Designly

Written by Designly

Full-stack web developer and graphics designer.

No responses yet