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
I thought this might be #26350, but that seems slightly different. Various searches led me to #19419 and #4130, but those issues have been marked as fixed and closed.
The text was updated successfully, but these errors were encountered:
TypeScript Version: 3.1.0-dev.20180830
Search Terms:
Spread length, Expected at least 1 arguments, but got 0 or more
Code
Porting this StackOverflow JS function into TypeScript, I got:
Expected behavior:
The code compiles and works.
Actual behavior:
Playground Link: http://www.typescriptlang.org/play/#src=function%20*cartesian%3CT%3E(head%3A%20T%5B%5D%2C%20...tail%3A%20T%5B%5D)%3A%20any%20%7B%0D%0A%20%20const%20remainder%20%3D%20tail.length%20%3E%200%20%3F%20cartesian(...tail)%20%3A%20%5B%5B%5D%5D%3B%0D%0A%20%20for%20(let%20r%20of%20remainder)%20for%20(let%20h%20of%20head)%20yield%20%5Bh%2C%20...r%5D%3B%0D%0A%7D
Related Issues:
I thought this might be #26350, but that seems slightly different. Various searches led me to #19419 and #4130, but those issues have been marked as fixed and closed.
The text was updated successfully, but these errors were encountered: