Skip to content

Conversation

@reklawnos
Copy link
Contributor

When performing a refactor, I noticed that removing the preloadedState param from a createStore call resulted in a different type than calling createStore with preloadedState. This is due to the return type of StoreCreator being slightly different for each signature. Specifically, the one without preloadedState does not include a type param for the action type.

This PR adds the action as a type param for the return type of the createStore function without a preloadedState param, as well as a couple of additional tests in tests/typescript/store.ts that make sure the action type param is included in the return type for both signatures.

@aikoven aikoven self-requested a review May 11, 2018 11:48
@timdorr
Copy link
Member

timdorr commented May 11, 2018

Thanks!

@timdorr timdorr merged commit c308849 into reduxjs:master May 11, 2018
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

Successfully merging this pull request may close these issues.

3 participants