DEV Community

Discussion on: A Type System

Collapse
asmyshlyaev177 profile image
Alex • Edited on

Just TS took enough time, but solve only simplest errors, those can be easily be caught by tests.
Most complex and time consuming errors come from misunderstanding of requirements, trying to use libraries wrong way, just bad code and no refactoring.

Mostly TS helps with autocomplete, very little benefits in long run.

researchgate.net/publication/25963...
medium.com/javascript-scene/the-sh...

Collapse
kalashin1 profile image
Kinanee Samson Author

In my opinion TypeScript provides much more than auto-complete. TypeScript is a large scale application tool that is employed by various software engineers and companies to build large scale web apps. TypeScript also aids a lot with documentation, throw in jsdoc to the mix and you have a great developer experience. Outside this TypeScript allows you to use out of the box features that are not yet supported in the browser... All the reasons for errors you gave above are actually true, if you have consumed any popular library you work with on JavaScript with TypeScript, you will understand the role TypeScript plays. The numbers speaks for themselves. Just check up how many people is using TypeScript.

Collapse
asmyshlyaev177 profile image
Alex

How many people use something doesn't mean it's automatically best option.
I remember GraphQL client for react, it's written on TS, doesn't change that is buggy as hell.

Another great article
medium.com/javascript-scene/the-ty...

Still need to learn pure JS, even weird parts. Still need to test code, testing in my experience makes huge impact, code review also.
Time and resources limited, time spent on fighting TS is time not spent on tests and refactoring, i see it a few times, didn't see other way around yet.