Tasty
TypeScript!
It's pretty good!
It's pretty good!
Hamilton, On 🇨🇦
@wesbos Tweet, tok and gram
Trice Weekly!
TypeScript is JavaScript with a Type system added on top.
It's not really a new language, it's just JavaScript plus some descriptions about what your data looks like.
They really should have called it DescriptiveJavaScript!
Types describe the type of data in your application.
Wes, you just used the word to describe the word.
An array of strings, not really that complex 😆
Let's break these down into some real world examples
Benefit #1
Benefit #2
Benefit #3
npm i @types/react
Benefit #4
Benefit #5
Benefit #6
Kind of important to know
Lots of things in TypeScript don't need to be typed.
They can be implied.
Type Checks ✅
Compiles to JS ✅
Type Checks ❌
Compiles to JS ✅
Rust Based
Fast as heck
Type Checks ❌
Compiles to JS ✅
Go Based
Fast as heck
uses esbuild
Does everything
dev server, live reloader, bundler, css, frameworks..
uses swc
Does everything
dev server, live reloader, bundler, css, frameworks..
For most projects, use vite or parcel
Tooling is SO GOOD right now
tsx uses esbuild
ts-node uses tsc. Also has a --swc
Thanks