【发布时间】:2015-11-02 14:44:37
【问题描述】:
function f([a,b,c]) {
// this works but a,b and c are any
}
这样写可以吗?
function f([a: number,b: number,c: number]) {
// being a, b and c typed as number
}
【问题讨论】:
-
我需要不同的数据类型
标签: arrays types typescript destructuring