Skip to content

Commit e26cb19

Browse files
Typescript 2.8 default type fixes.
1 parent 68b5252 commit e26cb19

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

index.d.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ export type ReducersMapObject<S = any, A extends Action = Action> = {
7777
*
7878
* @template M Object map of reducers as provided to `combineReducers(map: M)`.
7979
*/
80-
export type StateFromReducersMapObject<M> = M extends ReducersMapObject
80+
export type StateFromReducersMapObject<M> = M extends ReducersMapObject<
81+
any,
82+
any
83+
>
8184
? { [P in keyof M]: M[P] extends Reducer<infer S, any> ? S : never }
8285
: never
8386

@@ -106,7 +109,10 @@ export type ActionFromReducer<R> = R extends Reducer<any, infer A> ? A : never
106109
*
107110
* @template M Object map of reducers as provided to `combineReducers(map: M)`.
108111
*/
109-
export type ActionFromReducersMapObject<M> = M extends ReducersMapObject
112+
export type ActionFromReducersMapObject<M> = M extends ReducersMapObject<
113+
any,
114+
any
115+
>
110116
? ActionFromReducer<ReducerFromReducersMapObject<M>>
111117
: never
112118

0 commit comments

Comments
 (0)