Package: effect
Module: Data
Function type that constructs a tagged-union variant from its fields,
excluding the keys listed in Tag.
When to use
Use to type an individual constructor for one tagged-union variant.
Details
The constructor returns the full variant type A. If no fields remain
after excluding Tag keys, the constructor argument type becomes void.
Signature
type ConstructorFrom<A, Tag> = (
args: Types.VoidIfEmpty<{ readonly [P in keyof A as P extends Tag ? never : P]: A[P] }>
) => A
Since v4.0.0