There seems to be conflicting information on this topic. https://basarat.gitbooks.io/typescript/content/docs/classes.html (go to the inheritance section) suggests that it's supported, but I'm encountering compilation issues with my TypeScript code on playGround
class Point{
x:number;
y:number;
constructor(x:number, y:number){
this.x = x;
this.y = y ;
}
add(point:Point){
return new Point(this.x + point.x , this.y + point.y);
}
}
class Point3D extends Point{
z:number;
constructor(x:number, y:number, z:number){
super(x,y);
this.z = z;
}
add(point3d:Point3D){
// Error does not support duct type.
var point2D = super.add( {point3d.x, point3d.y});
return new Point3D(point2D.x, point2D.y, this.z);
}
}