UNPKG

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