VoidIfEmpty<S>Conditional type that returns void if S is an empty object type,
otherwise returns S.
When to use
Use to erase an empty object type from an API result or parameter position.
types
Source effect/Types.ts:7611 lines
export type type VoidIfEmpty<S> =
keyof S extends never ? void : S
Conditional type that returns void if S is an empty object type,
otherwise returns S.
When to use
Use to erase an empty object type from an API result or parameter position.
VoidIfEmpty<function (type parameter) S in type VoidIfEmpty<S>S> = keyof function (type parameter) S in type VoidIfEmpty<S>S extends never ? void : function (type parameter) S in type VoidIfEmpty<S>SReferenced by 6 symbols