In the previous section, we ran into a problem that is quite tough to understand if you have never worked with type systems. Let's learn a little bit about TypeScript itself to understand this better.
Understanding TypeScript
Type inference
The very first thing I want you to understand is type inference. You do not need to type everything. Some types can be inferred by TypeScript.
Imagine a situation where I have told you, "I have put only chocolate donuts in the box on your desk." Since, in this example, I pretend to be the computer, you can trust me. Hence, when you arrive at your desk, you are 100% sure that the box is of the Box<ChocolateDonut[]> type. You know this without opening the box or having...