摘要:
//在 JavaScript 中,有两种常见的定义函数的方式——函数声明(Function Declaration)和函数表达式(Function Expression): // 函数声明(Function Declaration) function sum(x, y) { return x + y 阅读全文
posted @ 2021-11-03 14:51
亦茫茫
阅读(818)
评论(0)
推荐(0)
摘要:
//有时候我们希望一个接口允许有任意的属性,可以使用如下方式interface Person { name: string; age?: number; [propName: string]: any; } let tom: Person = { name: 'Tom', gender: 'male 阅读全文
posted @ 2021-11-03 14:33
亦茫茫
阅读(485)
评论(0)
推荐(0)

浙公网安备 33010602011771号