Tuples in TypeScript

This entry is part 3 of 4 in the TypeScript series

Tuples in TypeScript With tuples we can define what type of data (variable type) can be stored in every position ( or few starting positions ) inside of an array. Once you define the tuple you can then use it to declare variables. Tuple types in TypeScript express an array where the type of certain […]



Continue reading

Intersection types in TypeScript

This entry is part 2 of 4 in the TypeScript series

Intersection types Purpose of this post is to get a basic understanding of intersection types and realize pros and cons of intersection types. Last time we talked about union types: let x: string | number; Variable x can be either string or a number. Consequently, you can use type guarding technique to exclude one of […]



Continue reading
1 9 10 11