Skip to content

Commit

Permalink
Fix DeepPartial type (reduxjs#3369)
Browse files Browse the repository at this point in the history
* Fix `DeepPartial` type

* Format

* Update index.d.ts

* Limit node version for now.
  • Loading branch information
OliverJAsh authored and kiku-jw committed Apr 6, 2019
1 parent c359d34 commit 886982c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ export interface Store<S = any, A extends Action = AnyAction> {
replaceReducer(nextReducer: Reducer<S, A>): void
}

export type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]> }
export type DeepPartial<T> = {
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K]
}

/**
* A store creator is a function that creates a Redux store. Like with
Expand Down

0 comments on commit 886982c

Please sign in to comment.