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
// A *self-contained* demonstration of the problem follows...classBase{f=()=>{console.log("one");}}classChildextendsBase{super_f=this.f;f=()=>{this.super_f();console.log("two");}}letc=newChild();c.f();
Expected behavior:
Should output
one
two
Actual behavior:
index.ts(8,20): error TS2448: Block-scoped variable 'f' used before its declaration.
It's not possible to use arrow functions + inheritance anymore.
More info: https://basarat.gitbooks.io/typescript/content/docs/arrow-functions.html#tip-arrow-functions-and-inheritance
TypeScript Version: 2.2.1 / nightly (2.2.0-dev.201xxxxx)
Code
Expected behavior:
Should output
Actual behavior: