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
// A *self-contained* demonstration of the problem follows...// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.constgen=function*(){yield2;yield3;}constgenInst=gen();for(letiofgenInst){console.log(i);}
Expected behavior:
No error is thrown
console.log should output yield value 2, 3
Just try it in Chrome debugger
Actual behavior:
TSC: throw type error
error TS2569: Type 'IterableIterator<2 | 3>' is not an array type or a string type.
TypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
Code
Expected behavior:
Actual behavior:
error TS2569: Type 'IterableIterator<2 | 3>' is not an array type or a string type.
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: