TypeScript Deep Partial Interface export type DeepPartial<T> = T extends Function ? T : (T extends object ? { [P in keyof T]?: DeepPartial<T[P]>; } : T); Before typescript@3.1 type DeepPartial = {