Explicitly marking generic direction.
out T
in T
interface Producer<out T> { get(): T; } interface Consumer<in T> { set(v: T): void; }