Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 606 Bytes

File metadata and controls

16 lines (11 loc) · 606 Bytes

TypeScript with tsx Loader

A standalone project showing TypeScript source files transpiled on-the-fly with --import tsx as a Node ECMAScript Modules importer.

npm i
npm run test

Note that the tsconfig.json file has compilerOptions:

  • "noEmit": true: as there's no need to transpile .ts files on disk to .js files on disk before running these tests
  • "module": "ESNext: indicating code should be transpiled in-memory as ESM

Additionally, package.json has "type": "module". If it didn't, TypeScript source files would need the .mts extension.