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

Update redux dependency to use built-in redux typings? #2

Closed
CarsonF opened this issue Jun 6, 2016 · 10 comments
Closed

Update redux dependency to use built-in redux typings? #2

CarsonF opened this issue Jun 6, 2016 · 10 comments

Comments

@CarsonF
Copy link

CarsonF commented Jun 6, 2016

The redux package now includes built in types. This is causing some conflict errors (as there are some incompatibilities). Could this package be rewired to use those typings?

@asvetliakov
Copy link
Owner

Hello,
You probably will be fine by using original DT version of redux-form if you want to use original redux typings, my changes to original DT version were very small and since the redux provides own typings now i'll probably going to drop this package since there is no need in it.

@CarsonF
Copy link
Author

CarsonF commented Jun 7, 2016

Wouldn't that be a step backwards?

@asvetliakov
Copy link
Owner

I don't think so. TS 2.0 will introduce own solution for management typings and they will be based from DT versions/DT registry

@CarsonF
Copy link
Author

CarsonF commented Jun 7, 2016

Isn't that what typings is as well?

@asvetliakov
Copy link
Owner

Typings is different story. TS will use NPM resolving method, typings does that by inlining dependencies into resulting file (i don't like that). Although as i know typings will work with new TS typings management by placing local typings.

@CarsonF
Copy link
Author

CarsonF commented Jun 7, 2016

Is there any info for that? All I can find is a line in their Roadmap:

  • tsd integration in tsserver/language service API

@asvetliakov
Copy link
Owner

microsoft/TypeScript#7156 third comment
Also you can check label "typings" in their issues list
https://github.com/Microsoft/TypeScript/issues?q=is%3Aissue+is%3Aopen+typings+label%3ATypings

@CarsonF
Copy link
Author

CarsonF commented Jun 7, 2016

So the version of redux-form on DT doesn't use the redux definition that redux provides. It's still the old one.

@asvetliakov
Copy link
Owner

Yes, it linked to the old redux typings. But in TS 2.0 typings resolution (it will replace ///reference path to ///reference types also) the bundled definition from redux will have precedence over DT version even if @types/redux package will be installed as dependency. I don't use redux-form now but you can try byself how it works with typescript@next version.

@CarsonF
Copy link
Author

CarsonF commented Jun 10, 2016

I'm not too concerned with how the definition is pulled in. But I guess I'm just lost on how that makes a difference since the definitions are incompatible with each other.

DT:

interface Dispatch extends Function {
    (action: any): any;
}

Redux:

export interface Dispatch<S> {
    <A extends Action>(action: A): A;
}

@CarsonF CarsonF closed this as completed Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants