DEV Community

Discussion on: I used to think TypeScript is a waste of time. Now I changed my mind.

Collapse
 
sirseanofloxley profile image
Sean Allin Newell • Edited

Documentation is key. If a library or code provides good JSDoc or TSDoc, that's more important to me as a user than if it compiled and has good 'type coverage' or even test coverage. $.02

That being said, I find using libraries with good types, and with great TSDocs, to provide a nicer and faster dev experience for me as a user.

I made an experimental library, lit-tea, that ports the elm architecture (simple redux basically) to typescript now that TS has exhaustive switch statements over unions; the library uses lit-html (templates) rather than react components. This is a far cry from my deaire for rich TSDocs, however the types are able to proivde a much more direct understanding of the system than react prop types or vue typings imo.

Collapse
 
bettercodingacademy profile image
Better Coding Academy

I agree completely with your point on documentation. Tests are crucial for user-focused insurance, whereas documentation is crucial for developer-focused insurance.