Skip to content

Comment on Running TypeScript Natively in Node.js

Comments

Whilst I use an esbuild based build pipeline to produce production artifacts, I've found that the combination of native type transformation and node:test improvements is now sufficient to do away with most test frameworks.

My nodejs projects have tests that run faster and have fewer breaking dependencies.

The two things I have to do are to always annotate type imports with type (I have a script for that), and to use file extensions on imports.

There's an ESLint rule with autofixes for that (annotating type imports) One for extension should exist somewhere too

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.