01 2024 档案

摘要://1、函数重载 function hello(name:string):string function hello(age:number):string function hello(value : string | number): string { if (typeof value 'stri 阅读全文
posted @ 2024-01-19 13:04 maplethefox 阅读(6) 评论(0) 推荐(0) 编辑
摘要://1、类型推断 不建议使用 let str = 'abc' str = '123' //console.log(str) //2、类型注释 let str1:string = "abc" str1 = 'ewer' //console.log(str1) //3、类型断言 let str2:str 阅读全文
posted @ 2024-01-18 14:17 maplethefox 阅读(5) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示