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 6d333e7 commit d656c54Copy full SHA for d656c54
packages/repository/src/common-types.ts
@@ -49,7 +49,11 @@ export interface AnyObject {
49
* An extension of the built-in Partial<T> type which allows partial values
50
* in deeply nested properties too.
51
*/
52
-export type DeepPartial<T> = {[P in keyof T]?: DeepPartial<T[P]>};
+// FIXME(rfeng): https://github.com/microsoft/TypeScript/issues/21592#issuecomment-496723647
53
+// export type DeepPartial<T> = {[P in keyof T]?: DeepPartial<T[P]>};
54
+export type DeepPartial<T> = {
55
+ [P in keyof T]?: T[P] extends never ? DeepPartial<T[P]> : DeepPartial<T[P]>;
56
+};
57
58
/**
59
* Type alias for strongly or weakly typed objects of T
0 commit comments