Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- someapifunc() // Returns a promise
- function* apifuncs() {
- var index = yield 1;
- index++;
- yield someapifunc(index - 1);
- }
- let calls = apifuncs();
- apifuncs.next().value.then() // Works
- apifuncs.next().value.then() // This won't because index and everything is out of the current scope
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement