DEV Community

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

Collapse
 
yawaramin profile image
Yawar Amin

The Apollo Context code you cited is not exactly a shining example of clear and idiomatic TypeScript code (exported function return types should be annotated, and the defined interface type contains lots of object and any), however I would argue that it's still easier to read than the JS version. If you read the JavaScript version, can you tell at a glance what the context value contains and what you can do with it? It's dead simple in the TypeScript version.