Introduction to Advanced Type Inferences
Learn about advanced type definitions and syntax considerations in TypeScript.
We'll cover the following
Advanced type definitions
The TypeScript language has given us a large toolbox with which to define custom types, inherit types from each other, and use generic syntax to work with any number of different types.
By combining these features, we can start to describe some seriously advanced type definitions, including types based on other types or types based on some or all of the properties of another type. We can also completely modify a type by adding and removing properties as we see fit.
We will explore more advanced type inference, including conditional types, inferred types, and mapped types, or, as the author describes it, “type mathematics.”
Syntax considerations
Be warned that the syntax used with advanced types can quickly become rather complicated to read, but if we apply some simple rules, it is easily understandable.
Get hands-on with 1400+ tech skills courses.