Install TypeScript inside your project (or globally) using npm. Once installed, use npx tsc --init to create a tsconfig.json file and npx tsc to compile your .ts files into .js.
For quick Node.js scripts without a manual compile step, tools like tsx let you run .ts files directly.
ADVERTISEMENT