Revert binding pattern inference changes, but only for tuples#46009
Revert binding pattern inference changes, but only for tuples#46009andrewbranch wants to merge 1 commit intomicrosoft:mainfrom
Conversation
|
@typescript-bot user test this inline |
|
Heya @andrewbranch, I've started to run the inline community code test suite on this PR at c3bcc4c. You can monitor the build here. Update: The results are in! |
|
@andrewbranch |
|
We realized that declare function f<T>(): T;
const [a, b, c] = f();should really error, and this PR makes it legal ( |
Partial revert of #45719—we now let an array binding pattern turn inference of an array into a tuple, which is really nice. I still think the behavior we were seeing for object binding patterns was undesirable, and #45846 supports that hypothesis since all the related errors were due to a tuple turning into an array.