News for hackers. Stuff that matters.
Re:Running TypeScript in Node.js without any extra tooling by mubou on Sunday April 13, 2025 @02:09PM (#43674664)
I love not needing tsnode anymore. Just wish it'd do type-checking, since without that we still need to install typescript separately. Add onto that a linter/formatter... meanwhile Deno does all of that natively. Node needs to step up its game.
Re:Running TypeScript in Node.js without any extra tooling by autocole on Sunday April 13, 2025 @02:44PM (#43674912)
It seems a little silly to not support some of the small additions TypeScript contributes when it could just be another flag to enable enum, namespace, constructor to property init support
Re:Running TypeScript in Node.js without any extra tooling by niedzielski on Sunday April 13, 2025 @03:09PM (#43675104)
you can try the --experimental-transform-types flag to support TypeScript code gen. I'll add it to the notes!

--experimental-transform-types: https://nodejs.org/en/blog/release/v22.7.0#experimental-tran...

Re:Running TypeScript in Node.js without any extra tooling by niedzielski on Sunday April 13, 2025 @01:12PM (#43674264)
I made a small template that demonstrates the new type-stripping feature in Node.js. Nothing fancy but I was surprised that I didn't need to install a TypeScript test runner and generally how nice it was.