Mastering TypeScript 3
上QQ阅读APP看书,第一时间看更新

Advanced types

TypeScript also has some advanced language features that can be used when working with basic types and objects. These features allow us to mix and match types a little more, as well as to create new types that are combinations of other types. In this section of the chapter, we will take a quick look at these advanced type features, including the following:

  • Union types
  • Type guards
  • Type aliases
  • Null and undefined
  • Never and unknown
  • Object rest and spread
  • Tuples
  • BigInt