UNPKG

faker-create-factory

Version:

Factory creator utility to Faker.js

13 lines (12 loc) 487 B
/** * DeepPartial Type * * @see https://github.com/piotrwitek/utility-types/blob/7f54af8dafd4780eb18315c693197e30773a4eab/src/mapped-types.ts#L523 */ export declare type DeepPartial<T> = T extends Function ? T : T extends (infer U)[] ? DeepPartialArray<U> : T extends object ? DeepPartialObject<T> : T | undefined; interface DeepPartialArray<T> extends Array<DeepPartial<T>> { } declare type DeepPartialObject<T> = { [P in keyof T]?: DeepPartial<T[P]>; }; export {};