TypeScript Tuple

samundrak

samundrak

JavaScript Dev

TS tuples are the same as an array but are subtypes of the array. Tuple can be defined in a special way that has fixed lengths where the values at each index have a specific and known value. Tuples have to be

explicitly typed when we declare them as both JS and TS have the same syntax for tuples and arrays. You will not find tuples in JS.