Run command
npm init
to initialize npm project (package.json).
npm i -D typescript ts-node
Typescript has been installed on the project, now we need to use it for setting up the configuration:
./node_modules/.bin/tsc --init
echo 'console.log("Hi")' > index.ts
node --loader ts-node/esm index.ts