标签:inter info ret each width code int abstract extend
abstract class Geom { getType() { return "Gemo"; } width: number; abstract getArea(): number; // 抽象方法 } class Circle extends Geom { getArea() { return 123; } } class Square {} interface Person8 { name: string; } interface Teacher8 extends Person8 { teacheringAge: number; } interface Student8 extends Person8 { age: number; } const teacher8 = { name: "dell8", }; const student8 = { name: "lee8", age: 15, }; const getUserInfo = (user: Person8) => { console.log(user.name); }; getUserInfo(teacher8); getUserInfo(student8);
标签:inter info ret each width code int abstract extend
原文地址:https://www.cnblogs.com/sinceForever/p/14847559.html