rambdax
Version:
Extended version of Rambda - a lightweight, faster alternative to Ramda
21 lines (17 loc) • 459 B
text/typescript
import {OptionalPart} from './Optional'
import {Depth} from './_Internal'
/**
Make all fields of `O` optional (deeply or not)
```ts
import {O} from 'ts-toolbelt'
type L = {a: {b: {c: 2}}, b: 1}
type test0 = O.Partial<L>
type test1 = O.Partial<L, 'deep'>
```
*/
export type Partial<O extends object, depth extends Depth = 'flat'> =
OptionalPart<O, depth>