diff --git a/index.d.ts b/index.d.ts index ced1559263..2c2cadcc0c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -59,8 +59,8 @@ export type Reducer = (state: S, action: AnyAction) => S; /** * Object whose values correspond to different reducer functions. */ -export interface ReducersMapObject { - [key: string]: Reducer; +export type ReducersMapObject = { + [key in keyof TState]: Reducer; } /** @@ -81,7 +81,7 @@ export interface ReducersMapObject { * @returns A reducer function that invokes every reducer inside the passed * object, and builds a state object with the same shape. */ -export function combineReducers(reducers: ReducersMapObject): Reducer; +export function combineReducers(reducers: ReducersMapObject): Reducer; /* store */