6. Advanced Types
Overview
This chapter introduces you to advanced types. You will start with the building blocks of advanced types – type alias, string, and number literals. This will allow you to gain a better understanding as you take on more complex concepts such as union types. You will also learn how you can combine types to build more complex types, such as intersections. Using advanced types, this chapter teaches you how to write code that is easier to understand for yourself and any others working with you or who are inheriting the project. By the end of this chapter, you will be able to build advanced types by combining primitive types, such as strings, numbers, and Booleans, with objects.