class People { name: string;age: number;constructor(name: string, age: number) {this.name = name;this.age = age;}eat(food: string): void {console.log("eat", food);}}class Student extends People {school: string;constructor(name: string, age: number, school: string) {super(name, age);this.school = school;}}let stu = new Student("lisi", 19, "qinghua");stu.eat("apple");
