3 Types, Aliases and Interfaces
This chapter covers
- Understanding the difference between type aliases and interfaces
- Putting into practice type widening
- Ordering type properties and extending interfaces suitably
- Applying type guards appropriately
- Making sense of the readonly property modifier
- Utilizing the keyof and Extract uitlity types effectively
Getting to grips with TypeScript can feel a bit like being invited to an exclusive party where everyone is speaking a slightly different dialect of a language you thought you knew well. In this case, the language is JavaScript, and the dialect is TypeScript. Now, imagine walking into this party and hearing words like "types", "type aliases" and "interfaces" being thrown around. It might initially sound as though everyone is discussing an unusual art exhibition! But, once you get the hang of it, these terms will become as familiar as your favorite punchline.