typelab / utils / ObjectPartial
type ObjectPartial<T, K> = _ObjectPartial<T, K>;Extended TypeScript `Partial` to make specific properties optional.
| Type Parameter | Description |
|---|---|
|
|
The original |
|
|
The keys of |
A type with the specified keys of T set as optional.
type Obj = { a: string; b: string };
// { a?: string; b: string }
type PartialObj = ObjectPartial<Obj, 'a'>;