Vinyl
    Preparing search index...

    Type Alias Invariant<T>

    Invariant: T & Required<T> & (input: T & Required<T>) => T & Required<T>

    Enforces type T to be in an invariant position. For example Invariant<Square> cannot be assigned to type Invariant<Polygon> or vice versa.

    This should be used when an interface with type parameter T needs strict invariance in addition to what the compiler can infer from use.

    https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)

    Type Parameters

    • T