Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dinja15
· 8y ago · 0 comments
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-i...
Comments
[–]
flanbiscuit
8y ago
Hold on, TS can typecheck your code just by using your jsdoc annotations?! That's a game changer for me!
[–]
egeozcan
8y ago
Yes and it works quite well. Sometimes JSDoc fails to provide enough info about the types though.