The result of watching a TypeScript Crash Course: https://www.youtube.com/watch?v=rAy_3SIqT-E
Install Node on OSX with brew install node
Install TypeScript with npm install -g typescript
(g for global)
Compile a .ts
file with tsc file.ts
(this turns the file into JavaScript .js
)
Auto-compile a .ts
file with tsc file.ts -w
(w for watch)
Include compiled .js
file in index.html
, then open in browser. Use dev tools to view console output of TypeScript (JavaScript) program.