当前位置:网站首页>Simple use of typescript's class interface
Simple use of typescript's class interface
2022-06-26 06:23:00 【One at the front】
1、 Interface inheritance extends
2、 Class is used in conjunction with interfaces implements
interface Radio{
switchRadio(trigger:boolean):void
}
interface Battery{
checkBatteryStatus():void
}
// Interface inheritance extends
interface RadioWithBattery extends Radio{
checkBatteryStatus():void
}
// Interface join class implements
class Cellphone implements Radio{
switchRadio(trigger:boolean){}
}
// Interface join class implements
class Cellphone2 implements RadioWithBattery{
switchRadio(trigger:boolean){}
checkBatteryStatus(){}
} 边栏推荐
- Introduction to canal deployment, principle and use
- TCP connection and disconnection, detailed explanation of state transition diagram
- Laravel implements groupby to query the number of packets
- 技术Leader的思考技巧
- Logstash - logstash pushes data to redis
- 如何让主线程等待子线程执行完毕后再执行
- 跨域的五种解决方案
- Multi thread synchronous downloading of network pictures
- Pytorch uses multi GPU parallel training and its principle and precautions
- Logstash - logstash sends an alarm email to email
猜你喜欢

100 cases of go language

Logstash -- send an alert message to the nail using the throttle filter

Evolution history of qunar Bi platform construction

GoF23—原型模式

在web页面播放rtsp流视频(webrtc)

DS18B20详解

如何设计好的技术方案

Basic construction of SSM framework
Play with a variety of application scenarios and share secrets with Kwai MMU

【golang】time相关
随机推荐
Ppt template crawler case
Number of connections server database message: error number 2003can't connect to MySQL server on 'server address' (10061)
消息队列-功能、性能、运维对比
Implement the runnable interface
API and encapsulation of cookies
Type de Typescript
Play with a variety of application scenarios and share secrets with Kwai MMU
Message queue - function, performance, operation and maintenance comparison
工作积累——Web请求中使用ThreadLocal遇见的问题
【Spark】Spark SQL 字段血缘如何实现
TCP connection and disconnection, detailed explanation of state transition diagram
Go语言学习笔记 1.2-变量篇
How to select and build a real-time data warehouse scheme
Laravel implements groupby to query the number of packets
【golang】time相关
Work accumulation - problems encountered in using ThreadLocal in web requests
Thinking skills of technical leaders
Mysql-10 (key)
China micro cultivator market trend report, technical dynamic innovation and market forecast
Installing rainbow in various kubernetes with Helm