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
Expected behavior:
There should be no error in this. ImplementingClass is an implementation of BaseClass and ImplementingType extends BaseType.
Actual behavior:
Mind the swap of assigns in the error stack in "Type 'W' is not assignable to type 'ImplementingType'."
error TS2345: Argument of type 'typeof ImplementingClass' is not assignable to parameter of type 'typeof BaseClass'.
Type 'ImplementingClass' is not assignable to type 'BaseClass<W>'.
Types of property 'test' are incompatible.
Type '(implementValue: ImplementingType) => void' is not assignable to type '(baseValue: W) => void'.
Types of parameters 'implementValue' and 'baseValue' are incompatible.
Type 'W' is not assignable to type 'ImplementingType'.
Type 'BaseType' is not assignable to type 'ImplementingType'.
Property 'value' is missing in type 'BaseType'.
The text was updated successfully, but these errors were encountered:
It seems duplicate of #16985, and it's caused by stricter generic checks (#16368), if you don't like this feature, you may have to enable --noStrictGenericChecks option.
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.4.1
Since 2.4.1 TypeScript is outright hating my decorated classes due to following problem:
Expected behavior:
There should be no error in this. ImplementingClass is an implementation of BaseClass and ImplementingType extends BaseType.
Actual behavior:
Mind the swap of assigns in the error stack in "Type 'W' is not assignable to type 'ImplementingType'."
The text was updated successfully, but these errors were encountered: