node.ts code example Example 1: npm typescript npm install -g typescript Example 2: npx run ts file npx ts-node src/foo.ts