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
It compiles to valid JavaScript, but still reports an error. I might not have run this code sample and assumed it would work based on microsoft/TypeScript#1931 (comment).
It looks like the only way to use Spread Op in the function call is to have a matching Rest Op in the function declaration. Hopefully, in the future TS will be able to type check spread properly.
I look forward to spreading Tuples into function params 😄
In the book, this code is demonstrated :
This is perfectly valid ES6 code, however AFAIK the TS compiler reports an error per microsoft/TypeScript#5296
The text was updated successfully, but these errors were encountered: