Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Failed to compile: Errors in @types #332

Open
akyker20 opened this issue May 28, 2018 · 1 comment
Open

Failed to compile: Errors in @types #332

akyker20 opened this issue May 28, 2018 · 1 comment

Comments

@akyker20
Copy link

I installed the react-redux and redux-thunk packages to my project.

When I run npm start, I get errors in both of these packages' types files. For instance:

/Users/austinkyker/reading_rewards/frontend/node_modules/@types/react-redux/index.d.ts
(37,59): Generic type 'Dispatch<A, S>' requires 2 type argument(s).

This prevents me from compiling my project. I think this might be because I am using redux 4 and the types for these projects have not been updated for redux 4.

Any ideas on what I should do?

Worst case I'd like to just ignore these errors. How can I do that and still compile?

@DorianGrey
Copy link
Collaborator

A sample project for reproducing this would be useful ... this is not mentioned for no reason in the issue template.
The error simply indicates that Dispatch is used without the type parameters it requires - dunno which one, since you've cut of the path that would mention this.
The current redux are declaring Dispatch with a single type parameter, which also has a default value and thus can be omitted. Same hold true for react-redux. redux-thunk does not even declare a type of this name.

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

No branches or pull requests

2 participants