top | item 41481568

(no title)

lyxell | 1 year ago

I guess you mean relying only on type inference? That will only get you so far. E.g. function parameters for freestanding functions would still be untyped. For those to be typed you need TypeScript or JSDoc annotations as OP noted.

discuss

order

cdaringe|1 year ago

Probably the OP meant “allowJs” and “noEmit” flags give you limited actual typechecking in your JS files

tacone|1 year ago

Exactly. You would use jsconfig in place of tsconfig, and disable the build just like you said. At that point you can use JSDoc for typing as well as .ts.d files when the JSDoc is not enough.

It's a bit more verbose, but overall I find it refreshing.