class Animal{ name: string constructor (name:string){ this.name=name } run(){ return `${this.name}` } } const snake=new Animal("geyao") class Dog extends Animal{ bark(){ return `${this.name}` } } const dog=new Dog("geyao")
class Animal{ name: string constructor (name:string){ this.name=name } run(){ return `${this.name}` } } const snake=new Animal("geyao") class Dog extends Animal{ bark(){ return `${this.name}` } } const dog=new Dog("geyao")