Skip to content

Typescript 7 won’t infer container types correctly #2244

Open
@lukeapage

Description

@lukeapage

What version of React, ReactDOM/React Native, Redux, and React Redux are you using?

  • React: latest
  • ReactDOM/React Native: na
  • Redux: latest
  • React Redux: latest

What is the current behavior?

See bug report here:
microsoft/typescript-go#977 (comment)

The types now fail with typescript go due to different type ordering.

The type ordering will change with typescript go and there afaik is not going to be any way round that.

What is the expected behavior?

In that comment Anders suggested a fix:

Ideally, the React declaration files would break the union parameter into separate overloads and list them in order of preference.

Which browser and OS are affected by this issue?

Na

Did this work in previous versions of React Redux?

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions