You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ahejlsberg
changed the title
Permit variadic tuple inference from trailing optional to non-optional
No variadic tuple inference from trailing optional to non-optional
Jul 14, 2020
In #39281 we switched to making no inferences from or to trailing optional elements in variadic tuples. That's a bit too strict. It is in fact fine to make inferences from trailing optional elements as long as they're made to non-optional elements.
TypeScript Version: 4.0.0-dev
Code
Expected behavior:
No errors.
Actual behavior:
Errors.
Playground Link:
https://www.typescriptlang.org/play/index.html?ts=4.0.0-dev.20200714&ssl=10&ssc=49&pln=1&pc=1#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwHMQMBVAZxBgAotgAueMjGLVAgGnhwAds8yA-AwDe8AB5DGzVgXgBfAJQMmLNgG4AUBtCRYCFOj74iGAPIwC5SjXpTVHLhYCSt1MgC2AI0qceRwSLwAJ6Sbl4+8ABekp44OBAgUPiKDABuOLSaGgaYuPhgUBAQAILcWAA8ACrwIGIYIKjAZPBoANaoOADuqADaALrwALzw-ZwkQ-DptAB8VO7EABY4tlQAdOuwBGQMPeurlb6eAFbgGH0KQ9PwJBfCGvAP8HAYyDD4axsW2yN7leeX8HmGCWwA+q02ZE4wkUmjkWgKRVKWCoJisMAUageAHosfAAKIwGA4GCcTzIDCMJbICDAVAAcgp3g0CJKZRRxHMlgo6Mx8Bx+MJxNJ5MpOGptIZ8CZQA
Related Issues:
#39595
The text was updated successfully, but these errors were encountered: