Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
akavi
· 6y ago · 0 comments
Am I understanding this correctly that typescript provides a type-level property on tuples called `"length"`?
Comments
[–]
jakear
6y ago
To clarify, the "tuple" is just an array with fixed length. So ts isn't "providing" the length property, it's simply surfacing the underlying Array#length in JS, which it knows to be a constant.
[–]
phpnode
6y ago
yep!