import { NonNullable as UNonNullable } from '../Union/NonNullable'; import { Depth } from './_Internal'; import { _Pick } from './Pick'; import { Key } from '../Any/Key'; import { PatchFlat } from './Patch'; import { BuiltIn } from '../Misc/BuiltIn'; /** * @hidden */ export declare type NonNullableFlat = { [K in keyof O]: UNonNullable; } & {}; /** * @hidden */ export declare type NonNullableDeep = { [K in keyof O]: O[K] extends BuiltIn ? O[K] : NonNullableDeep>; }; /** * @hidden */ export declare type NonNullablePart = { 'flat': NonNullableFlat; 'deep': NonNullableDeep; }[depth]; /** * @hidden */ export declare type _NonNullable = PatchFlat, depth>, O>; /** * Make some fields of `O` not nullable (deeply or not) * (Optional fields will be left untouched & `undefined`) * @param O to make non nullable * @param K (?=`Key`) to choose fields * @param depth (?=`'flat'`) 'deep' to do it deeply * @returns [[Object]] * @example * ```ts * ``` */ export declare type NonNullable = O extends unknown ? _NonNullable : never;