Update redux-typed to match latest third-party .d.ts files for React and Redux

This commit is contained in:
SteveSandersonMS
2016-05-02 11:17:26 -07:00
parent 5e92ec0bee
commit f798f308f3

View File

@@ -1,10 +1,5 @@
import * as React from 'react';
import { connect as nativeConnect, ElementClass } from 'react-redux';
interface ClassDecoratorWithProps<TProps> extends Function {
<T extends (typeof ElementClass)>(component: T): T;
props: TProps;
}
import { connect as nativeConnect } from 'react-redux';
export type ReactComponentClass<T, S> = new(props: T) => React.Component<T, S>;
export class ComponentBuilder<TOwnProps, TActions, TExternalProps> {
@@ -18,7 +13,7 @@ export class ComponentBuilder<TOwnProps, TActions, TExternalProps> {
public get allProps(): TOwnProps & TActions & TExternalProps { return null; }
public connect<TState>(componentClass: ReactComponentClass<TOwnProps & TActions & TExternalProps, TState>): ReactComponentClass<TExternalProps, TState> {
return nativeConnect(this.stateToProps, this.actionCreators as any)(componentClass);
return nativeConnect(this.stateToProps, this.actionCreators as any)(componentClass) as any;
}
}