Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported Callee of type YieldExpression for CallExpression #194

Open
mjohnst opened this issue Feb 3, 2022 · 4 comments
Open

Unsupported Callee of type YieldExpression for CallExpression #194

mjohnst opened this issue Feb 3, 2022 · 4 comments
Labels

Comments

@mjohnst
Copy link

mjohnst commented Feb 3, 2022

Writing react/redux code in Typescript and was experimenting to see if I could call result of yield'd select with some parameters (I do not believe you can actually do this, but I was just seeing if it would work).
select from redux-saga/effects version 1.0.5

This triggers the eslint error, though in practice I was passing some parameters:

const test = (yield select())();
@mjohnst
Copy link
Author

mjohnst commented Feb 3, 2022

image

@mozfreddyb mozfreddyb added the bug label Feb 3, 2022
@mozfreddyb
Copy link
Collaborator

Yes, that's definitely a bug. Thanks!

@mozfreddyb
Copy link
Collaborator

Theoretically, if you had a select function that returns functions and then we'd not be able to scan it. Because you could return whatever function, which is a hard-stop for all sorts of static analysis.

I think we have some existing code that gives up and says "ok, that's bad. stop doing that" which I could reuse. I'm pretty sure the YieldExpression is just an omission here.

@mjohnst: Do I correctly understand that you were just messing around and this is not blocking some sort of important work?

@mjohnst
Copy link
Author

mjohnst commented Feb 3, 2022

@mozfreddyb correct, this is not blocking me at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants