News for hackers. Stuff that matters.
Re:TypeScript 4.1 by gavinray on Thursday November 19, 2020 @08:31PM (#25156481)
It's more characters/more noise to the code to add a JSDoc comment block than it is to add a colon & typename next to the variables/values they belong to.
Re:TypeScript 4.1 by mslm on Thursday November 19, 2020 @08:43PM (#25156534)
Different things; the JSDoc is purposely bloated-looking on an initial generation because it's meant to give you the space to detail out the semantics of the parameters. You would frankly have to do the same thing with any type system anyway, JSDoc or similar just gives you that combined without any build system or tooling.
Re:TypeScript 4.1 by hajile on Friday November 20, 2020 @09:30AM (#25160716)
Types say what, docs say why.

The semantics of a number or a string aren't described by their basic type.