Skip to content

Commit

Permalink
Modify DeepPartial to recurse for objects only (#30)
Browse files Browse the repository at this point in the history
Source: Oliver Joseph Ash, reduxjs/redux#3369
files#diff-b52768974e6bc0faccb7d4b75b162c99
  • Loading branch information
b-houghton committed Jul 1, 2020
1 parent b45f86d commit 1bac2a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export type DeepPartial<T> = { [P in keyof T]?: DeepPartial<T[P]> };
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
export type GeneratorFnOptions<T, I> = {
sequence: number;
afterBuild: (fn: HookFn<T>) => any;
Expand Down

0 comments on commit 1bac2a4

Please sign in to comment.