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:
603 bytes
|
Line | |
---|
1 | import { Partial as OPartial } from '../Object/Partial';
|
---|
2 | import { Depth } from '../Object/_Internal';
|
---|
3 | import { Cast } from '../Any/Cast';
|
---|
4 | import { 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 | */
|
---|
20 | export declare type Partial<L extends List, depth extends Depth = 'flat'> = Cast<OPartial<L, depth>, List>;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.