import { _Pick } from './Pick'; import { Depth } from './_Internal'; import { Key } from '../Any/Key'; import { NonNullable } from '../Union/NonNullable'; import { PatchFlat } from './Patch'; import { BuiltIn } from '../Misc/BuiltIn'; /** * @hidden */ export declare type CompulsoryFlat = { [K in keyof O]-?: NonNullable; } & {}; /** * @hidden */ export declare type CompulsoryDeep = { [K in keyof O]-?: O[K] extends BuiltIn ? O[K] : CompulsoryDeep>; }; /** * @hidden */ export declare type CompulsoryPart = { 'flat': CompulsoryFlat; 'deep': CompulsoryDeep; }[depth]; /** * @hidden */ export declare type _Compulsory = PatchFlat, depth>, O>; /** * Make that `O`'s fields cannot be [[Nullable]] or [[Optional]] (it's like * [[Required]] & [[NonNullable]] at once). * @param O to make compulsory * @param K (?=`Key`) to choose fields * @param depth (?=`'flat'`) 'deep' to do it deeply * @returns [[Object]] * @example * ```ts * ``` */ export declare type Compulsory = O extends unknown ? _Compulsory : never;