Package: effect
Module: Types
Function-type alias encoding covariant variance for a phantom type parameter.
When to use
Use as a phantom field type to make a type parameter covariant in output position.
Details
Covariant<A> is assignable to Covariant<B> when A extends B, following
the subtype direction.
Example (Defining a covariant phantom type)
import type { Types } from "effect"
interface Producer<T> {
readonly _phantom: Types.Covariant<T>
readonly get: () => T
}
See
Covariant.TypeContravariantInvariantSignature
type Covariant<A> = (_: never) => A
Since v2.0.0