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
Error:(15, 9) TS2322: Type 'this' is not assignable to type 'Class1<Interface1>'.
Type 'Class1<T>' is not assignable to type 'Class1<Interface1>'.
Type 'Interface1' is not assignable to type 'T'.
Playground Link:
Need to enable strictFunctionTypes in Options Playground
Related Issues:
The text was updated successfully, but these errors were encountered:
This is the result of --strictFunctionTypes class Class1 is contravariant with respect to T, since T is used in contravarient location (i.e. keyof T). The result is that Interface1 needs to be assingbale to this, which is not true.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.8.1, 2.9.0-dev.20180516
Search Terms: Conditional Types, generics
Code
strictFunctionTypes: true
Expected behavior:
No error
Actual behavior:
Playground Link:
Need to enable strictFunctionTypes in Options
Playground
Related Issues:
The text was updated successfully, but these errors were encountered: