当前位置:网站首页>Interface (optimization type annotation)
Interface (optimization type annotation)
2022-06-22 16:36:00 【xiao_ zhu_ ting_ feng】
Interface ( Optimization type annotation , Name the type annotation of the object )
1. Use interface keyword , It becomes a module directly
interface IUser {
name:string
age:number
}
Use in objects ( Add... Directly after the object name :IUser that will do )
let p1: IUser = {
name: 'jack',
age:18
}
边栏推荐
猜你喜欢
随机推荐
面试题之JS判断数据类型的方法
oracle分库分表
[deep anatomy of C language] keywords if & else & bool type
Add a millennial sign to a number (amount in millennia)
全球首款AR隐形眼镜,元宇宙入口这次真的打开了?
SAP ABAP 中的用户出口和客户出口-015
Summary of Changan chain usage skills
jsp学习之(一)---------jsp概述
SAP ABAP table control and example-07
首个赛博格人陨落背后:科技与渐冻症的极限赛跑
面对默认导入失败的情况
SAP ABAP internal tables: create, read, populate, copy and delete-06
迭代器与生成器
Make the text template in pycharm project support jinjia2 syntax
nio使用可写事件处理一次性写不完情况
SAP ABAP 子屏幕教程:在 SAP 中调用子屏幕-010
接口(优化类型注解)
[C language] deeply analyze the relationship between pointer and array
双向数据绑定v-model与v-decorator
执行逻辑大同小异的实现类使用模板模式









