November 2019
Beginner
804 pages
20h 1m
English
The most straightforward examples are lists and arrays—two incredibly useful data structures that you'll find in most programming languages. Generally speaking, you do not want to have to reimplement such data structures for each specific data type. Instead, you want to have a single, canonical, and generic implementation that can work with different types.
In TypeScript, we can use the any keyword as a type to allows us to pass any type to our functions. However, as we have just mentioned, this would imply having to use type casts all the time, which is far from convenient.
Let's imagine ...
Read now
Unlock full access