redux
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -93,10 +93,9 @@ /// <reference types="symbol-observable" /> | ||
*/ | ||
export function combineReducers<T extends ReducersMapObject<any, any>>( | ||
reducers: T | ||
): Reducer<InferStateType<T>, InferActionTypes<InferReducerTypes<T>>> | ||
export function combineReducers<S>( | ||
reducers: ReducersMapObject<S, any> | ||
): Reducer<S> | ||
export function combineReducers<S, A extends Action = AnyAction>( | ||
reducers: ReducersMapObject<S, A> | ||
): Reducer<S, A> | ||
type InferActionTypes<R> = R extends Reducer<any, infer A> ? A : AnyAction | ||
type InferReducerTypes<T> = T extends Record<any, infer R> ? R : Reducer | ||
type InferStateType<T> = T extends ReducersMapObject<infer S, any> ? S : never | ||
/* store */ | ||
@@ -103,0 +102,0 @@ |
{ | ||
"name": "redux", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Predictable state container for JavaScript apps", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
159714