node typescript code example
Example 1: add typescript in node
npm init-y
yarn add -D @types/node typescript ts-node
npx tsconfig.json
"start": "ts-node src/index.ts",
console.log("Hello TypeScript");
yarn start
Example 2: install typescript using npm
npm install -g typescript
Example 3: npm typescript
npm install -g typescript
Example 4: typescript tutorial nodejs
npm install express @types/express
Example 5: nodejs typescript
try this config for nodejs + typescript using babel
https://pastebin.com/TR4BXPqL