标签:color function 包含 fun inf hello mic inter bsp
//接受一个对象,该对象里必须包含 number类型的age属性 function fun(stu:{age:number}){ console.info(‘hello‘) }
interface Student{ age:number } function fun(stu:Student){ console.info(stu.age) } let student={age:10,name:"tom"} fun(student)
标签:color function 包含 fun inf hello mic inter bsp
原文地址:https://www.cnblogs.com/buchizaodian/p/12826056.html