下面的 test 函数返回了一个匿名函数,这个匿名函数接受一个泛型参数。 return function (params: T) { return { params } } } type person = ReturnType type TypeABC=?? 请问这里该如何书写正确的类型才能约束 abc 的值 const abc: TypeABC = test()() 如上图所示,我该如何书写 TypeABC 的类型?
"https://wmprod.oss-cn-shanghai.aliyuncs.com/community/1724824307544_Akai.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/community/1724824307544_Akai.png) 如图,我知道supert是继承constructor的参数,但是为什么在react里面,有一些组件使用了super(props),而有一些没有写,还有在es6里就只是写了supert(),这些区别在哪呢?以及这里的这个constructor(props)...super(props)是起到什么作用呢 这个是全代码: "https://wmprod.oss-cn-shanghai.aliyuncs.com/community/1724824317832_Mixv.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/community/1724824317832_Mixv.png)