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
When running a rest type with multiple array types an error is thrown. Using (xx | yy)[] works however that is not always desired, due to the fact that it allows for mixing types in one array, and not two different types of arrays.
I think this is another manifestation to the same underlying issue as #15972. the compiler checks if the type of the rest parameter is just the "Array" type.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
When running a rest type with multiple array types an error is thrown. Using
(xx | yy)[]
works however that is not always desired, due to the fact that it allows for mixing types in one array, and not two different types of arrays.TypeScript Version: 2.8.1
Code
Expected behavior:
...args
should not throw an errorActual behavior:
The following error is thrown
Playground Link:
Playground
The text was updated successfully, but these errors were encountered: