// DeepPartial implementation taken from the utility-types NPM package, which is // Copyright (c) 2016 Piotr Witek (http://piotrwitek.github.io) // and used under the terms of the MIT license export type DeepPartial = T extends Function ? T : T extends Array ? _DeepPartialArray : T extends object ? _DeepPartialObject : T | undefined; type _DeepPartialArray = Array> type _DeepPartialObject = { [P in keyof T]?: DeepPartial }; export type DistributiveArray = T extends unknown ? T[] : never // From https://stackoverflow.com/a/50375286 export type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;