News for hackers. Stuff that matters.
Re:First look: adding type annotations to JavaScript by claytongulick on Thursday March 10, 2022 @11:36AM (#30628849)
Have you tried type annotations in jsdoc?

Inline /* @type */ statements and jsdoc type declarations coupled with .d.ts files for complex types achieves the same thing for me without the extra compilation step.

Re:First look: adding type annotations to JavaScript by LAC-Tech on Thursday March 10, 2022 @02:24PM (#30631262)
Yeah that's what I do as well. I actually find TS uglier now. It ends up being full of really long lines like:

    const myFunction(a: Long<TypeName>, b: Another<LongType>): FooBar