main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
513 bytes
|
Line | |
---|
1 | import { OptionalPart } from './Optional';
|
---|
2 | import { 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 | */
|
---|
18 | export declare type Partial<O extends object, depth extends Depth = 'flat'> = OptionalPart<O, depth>;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.