Skip to content

Commit 9827e2d

Browse files
OliverJAshtimdorr
authored andcommitted
Fix DeepPartial type (#3369)
* Fix `DeepPartial` type * Format * Update index.d.ts * Limit node version for now.
1 parent 104b134 commit 9827e2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.d.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ export interface Store<S = any, A extends Action = AnyAction> {
211211
replaceReducer(nextReducer: Reducer<S, A>): void
212212
}
213213

214-
export type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]> }
214+
export type DeepPartial<T> = {
215+
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K]
216+
}
215217

216218
/**
217219
* A store creator is a function that creates a Redux store. Like with

0 commit comments

Comments
 (0)