A few months back, I shared a cheat sheet for Typescript Control Flow. Today, I want to share a cheat sheet on types, which are the main reason why Typescript is so useful.
A few interesting features that aren’t too well known:
- The
keyof
operator and theType[Property]
illustrated in the Mapped Types section - One of my favorites: Union types and the even more powerful Template Union Types (bottom right corner of the cheat sheet)