News for hackers. Stuff that matters.
Re:Node.js adds experimental support for TypeScript by afavour on Thursday July 25, 2024 @07:54AM (#41067524)
I’ve had a lot of success combining JSDoc JS with .d.ts files. It’s kind of a Frankenstein philosophically (one half using TS and one half not) but the actual experience is great: still a very robust type system but no transpiling required.

In a world where ES modules are natively supported everywhere it’s a joy to have a project “just work” with zero build steps.

Re:Node.js adds experimental support for TypeScript by flanbiscuit on Thursday July 25, 2024 @04:02PM (#41072750)
I do this as well. JSDoc is great for simple definitions, but as soon as you want to do something more complicated (generics, operators, access types, etc) you get stuck. The .d.ts are ignored because you're only importing them within JSDoc comments.