/** * @since 2.0.0-alpha * * @packageDocumentation */ /*! * @maddimathon/utility-typescript@2.0.0-beta.2 * @license MIT */ import { AnyClass } from '../functions.js'; /** * Similar to the default Required, but this also makes any child objects * Required. * * @param T Type to require. */ export type RecursiveRequired = { [K in keyof T]-?: Required[K] extends number | null | string | undefined | AnyClass | Function | Date ? Required[K] : Required[K] extends (infer I)[] ? (object extends I ? RecursiveRequired[] : I[]) : Required[K] extends object ? { [S in keyof Required[K]]-?: RecursiveRequired[K]>[S]; } : Required[K]; }; /** * Requires the given required keys only and leaves the rest as-is. * * For the recursive version, see {@link RecursiveRequiredPartially}. * * @param T_Object Type or interface to convert to a class. * @param T_RequiredKeys Keys that cannot be undefined. Default `never`. */ export type RequiredPartially = Required> & Omit; /** * Recursively Requires the given required keys only and leaves the rest as-is — * i.e., the recursive version of {@link RequiredPartially}. * * @param T_Object Type or interface to convert to a class. * @param T_RequiredKeys Keys that cannot be undefined. Default `never`. */ export type RecursiveRequiredPartially = RecursiveRequired> & Omit; //# sourceMappingURL=required.d.ts.map