TypeScript Workshop
A 2 part practical guide to getting up and running with TypeScript in 1 hour
Setup
- Clone this repo:
git clone https://github.com/muholio/typescript-workshop
-
brew install yarn
-
yarn install
inside this repo - Install VSCode if you want out of the box TS config
- Open the root of folder in VSCode. Done!
- Optional: Install Prettier plugin
- Optional: Install eslint plugin
Overview/Timetables
Talk One
- The world of TypeScript
- What is TypeScript and how does it compare to JavaScript?
- A map of TypeScript tooling: Webpack, Babel vs TSC, eslint, Next.js
- Making friends with JavaScript: Definitely Typed and
@types
packages
- Enough TypeScript to write any program
- Basic types:
string
,number
,boolean
,array
- Type inferance
- Function types
- Object types
- Structural vs nominal typing
-
type
andinterface
-
any
andunkown
- Generics
- Exercises
- Basic types:
Talk Two
- Quick refresh of talk one: ecosystem and syntax
- Async programming
- Error handling
- Modules
- Exercises & questions!!!