Tuple destructuring type is different for different target
options.
#37045
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
TypeScript Version: 3.9.0-dev.20200226
Search Terms: target, indexing, tuple, destructuring, array, undefined, es5
Code
also patch
lib.es5.d.ts
from
to
Expected behavior:
Expect
tsc
to report 2 errors irrelevant of whichtarget
version is selected.Actual behavior:
When using option
"target": "es6"
:When using option
"target": "es5"
:Playground Link: https://github.com/nicu-chiciuc/typescript-issue-001
Related Issues:
#13778
#36635
The whole idea of chaining the indexing definition for arrays comes from the first issue and mentioned this problem in this comment.
I didn't realize that the behavior depends on the version of the
target
option.The text was updated successfully, but these errors were encountered: