loading...

re: Introduction to TypeScript Data Types — Tuple, Enum, and Any VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Tuple Vs Array was the most confusing thing in typescript for me.
 

A tuple is like an array but it's fixed length and has no array methods. Also, the type of each entry is fixed.

 

Yeah I it now, but the syntax don't make very clear.

Yea. It's better for it to not look like an array.

They probably just have to define tuples that way because it's an extension to JavaScript, so they can't define their own syntax.

code of conduct - report abuse