Closed rockettomatooo closed 3 years ago
@agilgur5 I see you added the duplicate-label. Could you maybe drop a link to what this issue duplicates and if there's a solution then? 🙈 I haven't found anything in that regard unfortunately 😅
Thanks in advance!
@rockettomatooo yea sorry, I just haven't had time to properly respond and write a full response (and find the exact issue to reference). If you check the the downlevelIteration
label, it's described well in those issues and there are directions on how to substitute that (but in one I have a better description than others).
I'm fairly sure that's the issue, but I also haven't had the time to confirm that.
Per my last comment, if you check the downlevelIteration
label, it has workarounds and next steps listed there. https://github.com/formium/tsdx/issues/915#issuecomment-718896740 summarizes and links out to a few specific comments.
Those are all array specific, not quite generators / iterables, but I believe they're both impacted by downlevelIteration
, so the same workarounds should work.
If those don't work, we can re-open this issue.
Current Behavior
For testing purposes, I added this little generator function to my code.
I then tried to destruct the resulting generator as an array like:
Expected behavior
I expected
console.log(test)
to log1
since that is, what the function yields. To me, this looks like a transpilling error but I haven't found anything I could configure or change to make it work. I used the sametsconfig.json
(pasted below) in a project created bycreate-react-app
and it works fine there.Reproduction
You can reproduce this behavior by creating a new tsdx lib and simply pasting the 2 snippets above into the
src/index.tsx
file building it and running the examples.Your environment
my
tsconfig.json
: