Init a tsconfig.json for TypeScript options with a few key options in your tsconfig.json (npx tsc --init --rootDir src --outDir lib --esModuleInterop --resolveJsonModule --lib es6,dom --module commonjs)
That's it! Fire up your IDE (e.g. code .) and play around. Now you can use all the built in node modules (e.g. import * as fs from 'fs';) with all the safety and developer ergonomics of TypeScript!
All your TypeScript code goes in src and the generated JavaScript goes in lib.
Bonus: Live compile + run
Add ts-node which we will use for live compile + run in node (npm install ts-node --save-dev)
Add nodemon which will invoke ts-node whenever a file is changed (npm install nodemon --save-dev)
Now just add a script target to your package.json based on your application entry e.g. assuming its index.ts: