当前位置:网站首页>Typescript的复合类型
Typescript的复合类型
2022-06-21 16:51:00 【CupidoZ】
interface goodStu{
id:number
}
interface badStu{
age:number
}
// &用于类型的复合 复合后新的类型将具有两种类型的属性
type norStudent = goodStu&badStu
let norStudentobj = {
id:1002,
age:26
}
TS支持符合类型检查 这样可以让对象具备多类型数据结构
边栏推荐
- What is the difference between IEC62133 and EN62133? Which items are mainly tested?
- Stack awareness - stack overflow instance (ret2libc)
- Lua导出为外部链接库并使用
- AI自己写代码让智能体进化!OpenAI的大模型有“人类思想”那味了
- 企业高管收入杂谈
- How to write technical documents software engineering at Google
- 海恩法则和费曼学习法
- C语言与Lua的交互(实践二)
- 拦截器实现网页用户登陆
- 有哪些好用的工作汇报工具
猜你喜欢
随机推荐
Leetcode 1108 IP address invalidation [violence] the leetcode path of heroding
EtherCAT igh master station controls three Delta asdaa2 servo rotating circles
堆栈认知——栈溢出实例(ret2libc)
Differences between WCDMA and LTE
结构建模设计——Solidworks软件之特征成型中旋转切除与圆角倒角功能实战总结(绘制一个沉头螺丝孔)
Paper notes ACL 2022 unified structure generation for universal information extraction
搜索(集训)
EtherCAT igh 'Fatal Sync Error'——0x002C,0x001A
Performance test ---locust's on_ Start and on_ Stop method
POSIX信号量
Development of digital collection system and construction of NFT artwork trading platform
Move Protocol Beta测试版稳定,临时决定奖池规模再扩大
PHP的empty,isset和is_null区别
堆栈认知——栈溢出实例(ret2text)
Basic file operation
我被变相降薪了
潤邁德醫療通過上市聆訊:預計虧損將增加,霍雲飛兄弟持股約33%
Zhong'an insurance, together with Alibaba health and huiyitianxia, explores a new model of Internet chronic disease management
Seventy years of neural network: review and Prospect
Interceptor to realize web user login









