mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Update redux-typed to match latest third-party .d.ts files for React and Redux
This commit is contained in:
@@ -1,10 +1,5 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { connect as nativeConnect, ElementClass } from 'react-redux';
|
import { connect as nativeConnect } from 'react-redux';
|
||||||
|
|
||||||
interface ClassDecoratorWithProps<TProps> extends Function {
|
|
||||||
<T extends (typeof ElementClass)>(component: T): T;
|
|
||||||
props: TProps;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type ReactComponentClass<T, S> = new(props: T) => React.Component<T, S>;
|
export type ReactComponentClass<T, S> = new(props: T) => React.Component<T, S>;
|
||||||
export class ComponentBuilder<TOwnProps, TActions, TExternalProps> {
|
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 get allProps(): TOwnProps & TActions & TExternalProps { return null; }
|
||||||
|
|
||||||
public connect<TState>(componentClass: ReactComponentClass<TOwnProps & TActions & TExternalProps, TState>): ReactComponentClass<TExternalProps, TState> {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user