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

Redux typings #1401

Closed
ulfryk opened this issue Feb 15, 2016 · 13 comments
Closed

Redux typings #1401

ulfryk opened this issue Feb 15, 2016 · 13 comments

Comments

@ulfryk
Copy link

ulfryk commented Feb 15, 2016

Current typings on DefinitelyTyped seem to be outdated and not so strict.
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/ffceea9dd124d277c4597c7bd12930666ec074c5/redux/redux.d.ts

// Type definitions for Redux v1.0.0
// Project: https://github.com/rackt/redux

I have prepared up-to-date version with more strict approach to type safety -> see it here.

Please update it or add typings to this repo. Or I can update it myself. I can help updating those typings also on future releases :)

@gaearon
Copy link
Contributor

gaearon commented Feb 15, 2016

Please send a PR to DefinitelyTyped. We don’t maintain them ourselves but your help is very welcome.

@gaearon gaearon closed this as completed Feb 15, 2016
@aikoven
Copy link
Collaborator

aikoven commented Feb 16, 2016

@ulfryk As you could see, it's been a while since DefinitelyTyped/DefinitelyTyped#7908 was submitted, and its predecessor DefinitelyTyped/DefinitelyTyped#6629 was stuck for even longer time without approval.

It seems that DefinitelyTyped model outgrown itself and we should move to Typings.

@ulfryk
Copy link
Author

ulfryk commented Feb 16, 2016

@aikoven - yes I see - my proposition is also on it's way to stuck ;) ( 8093

@wbuchwalter
Copy link
Contributor

Another option would be to maintain them directly in the repo, like what is done for ng-redux, with an index.d.ts at the root.
This seems to be the best solution since TypeScript 1.6, see Typings for npm packages, and doesn't require any action from the user to get the typings working.
Your call @gaearon, I can understand your wish of keeping redux free of specific languages considerations as well.

@gaearon
Copy link
Contributor

gaearon commented Feb 16, 2016

I’m happy to keep it in our repo if somebody is willing to maintain them.

@wbuchwalter
Copy link
Contributor

👍
We have been ~10 recurrent people debating on this issue in the various PR at definitlyTyped, so I think there will be plenty of people willing to help on that, myself included.
Plus, if you make a change to Redux's API, outdated typings will only affect TypeScript user, so it will force the community to act, and have no impact on non-TS users (and typings are really easy to do, so the barrier of entry to make a PR is fairly low).

@aikoven, are you ok to bring back your PR here as something compliant with TS 1.6 definition files for npm modules ?

Does anyone see any problem with this approach that I may have missed?

(Pinging @xogeny @Keats @abarre)

@ulfryk
Copy link
Author

ulfryk commented Feb 16, 2016

👍 I can help maintaining TS typings in this repo. That is definitely the most user friendly way :)

@aikoven
Copy link
Collaborator

aikoven commented Feb 16, 2016

@wbuchwalter I'll do it.

@abarre
Copy link

abarre commented Feb 16, 2016

I think that the approach of keeping the definition file in this repo is better.
So, +1.

@xogeny
Copy link

xogeny commented Feb 16, 2016

+1

Keeping a typing a here is much better in my opinion. I've had very good luck with npm+TS using latest versions of TS.

@aikoven
Copy link
Collaborator

aikoven commented Feb 16, 2016

Done.

@gaearon
Copy link
Contributor

gaearon commented Feb 19, 2016

Please help review the new official typings in #1413.

@gaearon
Copy link
Contributor

gaearon commented Apr 8, 2016

Typing from #1431 have been released with Redux 3.4.0. Big thanks to everyone who made this happen!

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

6 participants