UNPKG

513 BTypeScriptView Raw
1import { OptionalPart } from './Optional';
2import { Depth } from './_Internal';
3/**
4 * Make all fields of `O` optional (deeply or not)
5 * @param O to make optional
6 * @param depth (?=`'flat'`) 'deep' to do it deeply
7 * @returns [[Object]]
8 * @example
9 * ```ts
10 * import {O} from 'ts-toolbelt'
11 *
12 * type L = {a: {b: {c: 2}}, b: 1}
13 *
14 * type test0 = O.Partial<L>
15 * type test1 = O.Partial<L, 'deep'>
16 * ```
17 */
18export declare type Partial<O extends object, depth extends Depth = 'flat'> = OptionalPart<O, depth>;