Let’s bootstrap a simple Typescript Node.js application locally on our machines
npm install -g typescript
mkdir node-app
cd node-app
npm init -y
npx tsc --init
These commands should initialize two files in your project

const x: number = 1;
console.log(x);
tsc -b

Notice how there is no typescript code in the javascript file. It’s a plain old js file with no types
a.jsMake sure you convert the const to let
let x: number = 1;
x = "harkirat"
console.log(x);
tsc -b