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

Failed to compile: Errors in @types  #332

@akyker20

Description

@akyker20

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?

Activity

DorianGrey

DorianGrey commented on May 29, 2018

@DorianGrey
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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @DorianGrey@akyker20

        Issue actions

          Failed to compile: Errors in @types · Issue #332 · wmonk/create-react-app-typescript