@augment-vir/common
Version:
A collection of augments, helpers types, functions, and classes for any JavaScript environment.
9 lines (8 loc) • 368 B
TypeScript
/**
* Sets `T` as partial if `ShouldBePartial` is `true`. Otherwise, `T` is left alone.
*
* @category Type
* @category Package : @augment-vir/common
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
*/
export type MakePartial<T extends object, ShouldBePartial extends boolean> = ShouldBePartial extends true ? Partial<T> : T;