@augment-vir/common
Version:
A collection of augments, helpers types, functions, and classes for any JavaScript environment.
10 lines (9 loc) • 322 B
TypeScript
import { type IsEmptyObject } from 'type-fest';
/**
* Excludes empty objects from a union.
*
* @category Object
* @category Package : @augment-vir/common
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
*/
export type ExcludeEmpty<T> = IsEmptyObject<T> extends true ? never : T;