We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e88e23 commit ed62e2bCopy full SHA for ed62e2b
src/interface.ts
@@ -232,11 +232,11 @@ export interface InternalHooks {
232
}
233
234
/** Only return partial when type is not any */
235
-type RecursivePartial<T> = T extends object
+type RecursivePartial<T> = NonNullable<T> extends object
236
? {
237
- [P in keyof T]?: T[P] extends (infer U)[]
+ [P in keyof T]?: NonNullable<T[P]> extends (infer U)[]
238
? RecursivePartial<U>[]
239
- : T[P] extends object
+ : NonNullable<T[P]> extends object
240
? RecursivePartial<T[P]>
241
: T[P];
242
0 commit comments