ts-类与接口

interface Radio{
  switchRadio(triggrL:boolean):void;

}
interface Bettery{
  checkBettery();
}

interface RadioAndBettery extends Radio{
  checkBettery();
}
class Car implements Radio{
  switchRadio(){

  }
}
class Cellphone implements RadioAndBettery{
  switchRadio(){

  }
  checkBettery(){

  }
}

  

原文地址:https://www.cnblogs.com/chenlw/p/14116709.html