将类作为泛型参数并对其进行约束

时间:2016-05-26 18:04:27

标签: generics typescript typing

我正在尝试为react-redux编写类型(请参阅https://github.com/andrew-w-ross/typings-react-redux/blob/master/react-redux.d.ts

所以我想说,connect函数返回一个带有签名(class: T) => T的函数,其中Ttypeof TElement其中TElement extends React.Component<IAppProps & IDispatcher, void>({{1}只包含调度方法)。

0 个答案:

没有答案