@nzakas can we generate .d.ts files with interfaces from JSDoc comments? @shivelysanders ?
Conversation
Notices
-
Embed this notice
Sergey on FunctionalScript (functionalscript@techhub.social)'s status on Sunday, 04-Feb-2024 04:28:33 JST Sergey on FunctionalScript -
Embed this notice
Nicholas C. Zakas (nzakas@fosstodon.org)'s status on Sunday, 04-Feb-2024 04:28:34 JST Nicholas C. Zakas For humanfs, I'm using a kind of TypeScript-JavaScript hybrid setup for the first time, and I'm kind of loving it.
Interfaces are written in TypeScript files, while the functionality is written in JavaScript files with JSDoc type annotations.
One of my big complaints about TypeScript is when people mix type/interface definitions with functionality. When 75% of a file is long type definitions, it's maddening for me.
This way, I'm writing mostly clean JavaScript, but still get type checking.
-
Embed this notice