import { Pick } from './Pick'; import { Depth } from './_Internal'; import { Key } from '../Any/Key'; import { PatchFlat } from './Patch'; import { Equals } from '../Any/Equals'; /** * @hidden */ export declare type OptionalFlat = { [K in keyof O]?: O[K]; } & {}; /** * @hidden */ export declare type OptionalDeep = { [K in keyof O]?: OptionalDeep; }; /** * @hidden */ export declare type OptionalPart = { 'flat': OptionalFlat; 'deep': OptionalDeep; }[depth]; /** * Make some fields of `O` optional (deeply or not) * @param O to make optional * @param K (?=`Key`) to choose fields * @param depth (?=`'flat'`) 'deep' to do it deeply * @returns [[Object]] * @example * ```ts * ``` */ export declare type Optional = { 1: OptionalPart; 0: PatchFlat, depth>, O>; }[Equals];