diff --git a/lib/types.ts b/lib/types.ts index a86a587..01a974b 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -1,4 +1,6 @@ -export type DeepPartial = { [P in keyof T]?: DeepPartial }; +export type DeepPartial = { + [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; +}; export type GeneratorFnOptions = { sequence: number; afterBuild: (fn: HookFn) => any;