Friday, June 22, 2018

Use returned values from super calls as ‘this’ in typescript

class Base{ x: number; constructor() { // return a new object other than `this` return { x: 1, }; } } class Derived extends Base { constructor() { super(); }

public ShowValue(){
this.x;
} }

No comments:

Post a Comment