Array Type Shenanigans
A Learning TypeScript > Type Operations 🥗 appetizer project.
Hi! This is Josh, author of Learning TypeScript. Congrats on making it all the way through the book to the final chapter! Type operations are a ton of fun to play around with once you get the hang of them.
These appetizer projects showcase a bunch of my favorite cool things you can do using array and/or tuple types with conditional types. Each gives a small into to the new thing because it can be tricky to find out the ways you can or cannot combine type operations. There's no silly theme, to help not distract from learning those new things.
I hope you're enjoying the book and these projects! 💖
If you haven't yet, set up the github.com/LearningTypeScript/projects repository locally.
git clone https://github.com/LearningTypeScript/projects learning-typescript-projects
Change your terminal directory to this project's:
Start the TypeScript compiler in watch mode:
- Don't import code from one step into another.
- You'll be working entirely in the type system. There will be no runtime code. 🤘