- foo@bar$ npm init -y
- foo@bar$ npm install typescript --save-dev
- foo@bar$ npm install @types/node --save-dev
- foo@bar$ npx tsc --init --rootDir src --outDir build --esModuleInterop --resolveJsonModule --lib es6 --module commonjs --allowJs true --noImplicitAny true
- foo@bar$ mkdir src
- foo@bar$ echo 'console.log("Hello world!")' > src/index.ts
- foo@bar$ npx tsc
- foo@bar$ node ./build/index.js
Created
April 14, 2023 11:09
-
-
Save hughpearse/744ca7f82e4d79a95c58a38de110a569 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment