It is currently per spec, but I don't think this behavior is desirable. This should probably be an error by some new rule.
Well the problem is that you're going to get that numeric index signature from Array<T>. There is another discussion about having an alternative interface for tuples at https://github.com/Microsoft/TypeScript/issues/4988#issuecomment-145705203.
I know guys you are trying your best, but I don't see an array, I only see a tuple which is not an array in a broad sense.
:+1: This is invalid behavior.
I ran into exactly the same issue.
See proposal #6229
It's now an error for tuples to have extra elements (#17765), so maybe we could revisit this? @sandersn @RyanCavanaugh
@aleksey-bykov the arc of language design is long but it bends toward justice. Accepting PRs
god works in mysterious ways
Most helpful comment
god works in mysterious ways