Computing with tuples in TypeScript
JavaScript’s Arrays are so flexible that TypeScript provides two different kinds of types for handling them: Array types for arbitrary-length sequences of values that all have the same type – e.g.: Array<string> Tuple types for fixed-length sequences of values where each one may have a different type – e.g.: [number, string, boolean] In this blog post, we look at the latter – especially how to compute with tuples at the type level.