Hi! This is the companion code repository for my Intro to TypeScript EmergentWorks workshop.
See JoshuaKGoldberg/typescript-intro-emergentworks-react#1 for results and raw notes from the workshop! ⚒
- typescriptlang.org has complete docs on using the TypeScript language.
- typescriptlang.org/play has an online playground you can write TS code in.
- code.visualstudio.com describes installing and using VS Code (optional).
Run these somewhere on your computer to download this repository and install its requirements:
git clone https://github.com/JoshuaKGoldberg/typescript-intro-emergentworks
cd typescript-intro-emergentworks
npm i
You can then open the folder in your editor. For example, with VS Code:
code .
It's generally easiest to install TypeScript globally:
npm i -g typescript
We recommend you then run TypeScript in "watch" mode on individual code examples by providing it the -w
flag and a path to the example.
For example, to start TypeScript running on the first code example:
tsc -w src/1
Alternately, if you'd prefer not to install TypeScript globally, you can use it as an already-installed dependency of this repository with the npm run compile
command:
npm run compile -- src/1 -w
# Alternately: yarn compile src/1 -w