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:
In 3.6.3 and <=3.7.0-dev.20190926, this code would compile without error
Actual behavior:
error TS2424: Class 'BaseClass' defines instance member function 'foo', but extended class 'ChildClass' defines it as instance member property.
8 foo = () => null;
~~~
Since our code has to compile down to ES5 (to support IE11), we need to perform some sort of method binding on methods that reference this. With this change, it means we would need to make all possibly-overridable member functions arrow functions
TypeScript Version: 3.7.0-dev.20190927 (works on 3.7.0-dev.20190926)
Search Terms:
TS2424, member function
Code
Expected behavior:
In 3.6.3 and <=3.7.0-dev.20190926, this code would compile without error
Actual behavior:
Since our code has to compile down to ES5 (to support IE11), we need to perform some sort of method binding on methods that reference
this
. With this change, it means we would need to make all possibly-overridable member functions arrow functionsPlayground Link: http://www.typescriptlang.org/play/index.html?ts=3.7-Beta#code/MYGwhgzhAEBCkFMDC4rQN4Cho+gMwHsCAKASg21yoCcEAXAV2oDtpmGQQBuSnAX0wDMoSDCQALAJYgAJilHQEADzoJmMmPAjJUMLFUIFoAXmhkTAPjYdugoA
Related Issues:
The text was updated successfully, but these errors were encountered: