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
Where is redux-saga definitions? #2013
Comments
You're probably looking for the package https://www.npmjs.com/package/@redux-saga/types instead, published from the packages/types folder of this repository: https://github.com/redux-saga/redux-saga/tree/master/packages/types |
We publish TS types to npm and they are available from the IDE. Not sure why WebStorm doesn't pick them up but I'm afraid that you would have to research this on your own. |
That's OK. It works without WebStorm recognizing the function. |
Got the same problem with WebStorm |
I am facing the same issue. But it doesn't show "redux-saga", it does show "redux-saga-routines" & "redux-saga-tester". In Visual Studio Code works perfectly |
@orekav I don't have any redux or saga related libraries there. But it works for me now, although my initialization is done in a *.ts file now, not sure if it matters or not. |
Closing due to inactivity. |
Sorry for reopening this issue but I've encountered a similar issue. I'm working on a mixed javascript/typescript project using WebStorm; when I import an effect in a import { race } from "redux-saga/effects"; But if I change the import path to: import { race } from "@redux-saga/core/effects"; everything starts working as expected. Is importing from |
So generally speaking, yes, it is not ideal to rely on internal packages because those paths are subject to change and we make no guarantees that they will exist. If we follow the breadcrumbs for how
As you can see in the second bullet, that's how we are forwarding the types to the user through We have no plans on changing the internal structure of this project. I'm not entirely sure why your IDE is not picking up the types. I'm curious, if you reference |
Hi @neurosnap, thanks for answering 🚀 I can confirm that (locally in WebStorm) type inference works properly for Locally, VS Code works fine, but I've created a minimal repro on StackBlitz (remote editor) that demonstrates my issue for both TS and JS files. Unfortunately, this issue seems to be inconsistent between local and remote editors. |
I use WebStorm for development of create-react-app applications.
So I have all the regular things installed and
redux-saga
among them.Currently the following sequence
leads to an IDE warning on sagaMiddleware.run line:
So it seems that I don't have any proper type definitions installed.
I tried to search for them in the WebStorm types repository but found nothing.
I also searched for
@types/redux-saga
package on npmjs and found this one: https://www.npmjs.com/package/@types/redux-sagaAs you can see it shows the deprecation message:
Yeah, cool. It means I should have it already, should I? Then where is it?
The text was updated successfully, but these errors were encountered: