You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unbelievably this is the minimal reproduction I was able to make.
interfaceI<Dummy,V>{c: C<Dummy,V>;}classC<Dummy,V>{declaresub: I<Dummy,V>;declarecovariance: V;}// should be a type error, but none emittedconstc1: C<unknown,string>=newC<unknown,number>();
Expected behavior:
new C<unknown, number>() should not be assignable to C<unknown, string> due to existence of the covariance property.
TSC should emit an error like Type 'C<unknown, number>' is not assignable to type 'C<unknown, string>'.