3 ms·
Typescript also supports comment typing via JSDoc. I write complex types in a definition file and use them in JSDoc. Works great. https://github.com/Microsoft/T
by dinja15 8y ago
Typescript also supports comment typing via JSDoc. I write complex types in a definition file and use them in JSDoc. Works great.
https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-in-JavaScript https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-i...
- flanbiscuit 8y agoHold on, TS can typecheck your code just by using your jsdoc annotations?! That's a game changer for me!
- egeozcan 8y agoYes and it works quite well. Sometimes JSDoc fails to provide enough info about the types though.