-
Notifications
You must be signed in to change notification settings - Fork 889
Function generator: error in yield
statement
#706
Comments
This looks like an error reported by the compiler rather than TSLint... can you post your full stack trace or console output? |
A problem on the TSLint side might be that we target ES5 instead of ES6. I think generators only work in ES6. |
When I run I am targetting ES6. Here is my
Hope this information helps somehow. Thanks, O. |
@zdychacek Sorry, I didn't mean that you need to be targeting ES6; I meant that TSLint ought to have an option that makes it target ES6 when analyzing your code. I don't know if that's the issue for sure though. Definitely a bug either way, thanks for reporting it! |
Seems like we can handle this better even when internally targeting ES5, see the above PR. Should be in a release sometime soon |
Great, thank you! O. |
the fix will be released in v2.5.2. until then, I think you can avoid the issue with |
Hi,
I am getting an error in
yield
statement 'Error: expected an assignment or function call' message in following code:Is there really any error in my code?
Thanks for your reply,
O.
The text was updated successfully, but these errors were encountered: