effect-io-ai

Package: effect
Module: Types

Types.VoidIfEmpty

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.

Signature

type VoidIfEmpty<S> = keyof S extends never ? void : S

Source

Since v3.19.20