This is a 1 minute guide on how to setup Node.js with Typescript.
Install Typescript and its dependencies.
npm install typescript ts-node @types/node @types/express --save-dev
# or
yarn add typescript ts-node @types/node @types/express -DCreate a tsconfig.json for your Typescript.
npx tsc --initThen write your first lines of code in any file (I'm using app.ts)
Then run the application using the below script
npx ts-node app.tsThis will also supports import and export modules directly as it uses tsc
