Type Alias Contravariant<T>

Contravariant<T>: ((input: T) => void)

Enforces type T to be in a covariant position. For example Invariant<Polygon> can be assigned to type Invariant<Square> but not vice versa.

This should be used when an interface with type parameter T does not explicitly use T in an input position, but the interface implies in T.

Type Parameters

  • T