Skip to content

Commit 91ffd73

Browse files
authored
Merge pull request #17 from jvm-redux/creator-creates-store-with-reducer-type
Api proposal : the store state's type is inferred by the creation method
2 parents cfde3bd + 8467fa9 commit 91ffd73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api/src/main/java/redux/api/Store.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public interface Store<S> extends Dispatcher {
5252
*
5353
* @see <a href="http://redux.js.org/docs/Glossary.html#store-creator">http://redux.js.org/docs/Glossary.html#store-creator</a>
5454
*/
55-
interface Creator<S> {
55+
interface Creator {
5656

5757
/**
5858
* Creates a store.
@@ -61,7 +61,7 @@ interface Creator<S> {
6161
* @param initialState Initial state for the store
6262
* @return The store
6363
*/
64-
Store<S> create(Reducer<S> reducer, S initialState);
64+
<S> Store<S> create(Reducer<S> reducer, S initialState);
6565

6666
}
6767

@@ -70,15 +70,15 @@ interface Creator<S> {
7070
*
7171
* @see <a href="http://redux.js.org/docs/Glossary.html#store-enhancer">http://redux.js.org/docs/Glossary.html#store-enhancer</a>
7272
*/
73-
interface Enhancer<S> {
73+
interface Enhancer {
7474

7575
/**
7676
* Composes a store creator to return a new, enhanced store creator.
7777
*
7878
* @param next The next store creator to compose
7979
* @return The composed store creator
8080
*/
81-
Creator<S> enhance(Creator<S> next);
81+
Creator enhance(Creator next);
8282

8383
}
8484

0 commit comments

Comments
 (0)