SOURCE

class zoo {
  
  public name:string;

  public constructor(name:string){
    this.name = name;
  }
	
	public sayName(name):void
  {
    console.log(this.name);
  }

}

class dog extends zoo{
  
}

let checkZooName = new dog("小狗");

console.log(checkZooName.sayName());
console 命令行工具 X clear

                    
>
console