I think typescript should always be used. In build scripts, browser-side, serverside, or even code snippets.
Its also my opinion that most projects type definitions don't haveto be watertight. Only define the types one need when one need them, and dont overcomplicate things.
Typescript as language is only the type definition parts, the rest is just javascript. So the way i see it typescript is just forcing well-documented javascript.
I really like TS, but I still prefer vanilla JS for small R&D projects. Setting up TS infrastructure and fighting with types is waste of time if you just need to check a hypothesis and throw away the project when it's done.
If TypeScript were the standard for many years, I would definitely agree.
But if you have a whole codebase to migrate or a team that is not proficient with TypeScript, I'm not sure if that would be a good choice since it would cost a lot. That's why I think the pros and cons should be measured beforehand.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think typescript should always be used. In build scripts, browser-side, serverside, or even code snippets.
Its also my opinion that most projects type definitions don't haveto be watertight. Only define the types one need when one need them, and dont overcomplicate things.
Typescript as language is only the type definition parts, the rest is just javascript. So the way i see it typescript is just forcing well-documented javascript.
I really like TS, but I still prefer vanilla JS for small R&D projects. Setting up TS infrastructure and fighting with types is waste of time if you just need to check a hypothesis and throw away the project when it's done.
If TypeScript were the standard for many years, I would definitely agree.
But if you have a whole codebase to migrate or a team that is not proficient with TypeScript, I'm not sure if that would be a good choice since it would cost a lot. That's why I think the pros and cons should be measured beforehand.