4
对象基本上,我有这样的:TYPEOF论点打字稿
function foo(){
// literally pass the arguments object into the pragmatik.parse method
// the purpose of pragmatik.parse is to handle more complex variadic functions
const [a,b,c,d,e] = pragmatik.parse(arguments);
// now we have the correct arguments in the expected location, using array destructuring
}
所以我们有pragmatik.parse
方法:
function parse(args){
// return parsed arguments
}
现在我想用打字稿定义类型,所有我知道的是,争论是一个对象:
function parse(args: Object){
}
所以我的问题是:TypeScript给定义或类型的arguments
JS中的对象?对不起,这有点儿元,但请耐心等待,我问的是理智的。