mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
Make React-Redux work in UMD/Global setup (#10049)
This commit is contained in:
committed by
Mohamed Hegazy
parent
c7bae3970a
commit
94d4f0e96e
Vendored
+12
-4
@@ -6,9 +6,13 @@
|
||||
/// <reference path="../react/react.d.ts" />
|
||||
/// <reference path="../redux/redux.d.ts" />
|
||||
|
||||
declare module "react-redux" {
|
||||
import { ComponentClass, Component, StatelessComponent, ReactNode } from 'react';
|
||||
import { Store, Dispatch, ActionCreator } from 'redux';
|
||||
declare namespace ReactRedux {
|
||||
type ComponentClass<P> = __React.ComponentClass<P>;
|
||||
type StatelessComponent<P> = __React.StatelessComponent<P>;
|
||||
type ReactNode = __React.ReactNode;
|
||||
type Store<S> = Redux.Store<S>;
|
||||
type Dispatch<S> = Redux.Dispatch<S>;
|
||||
type ActionCreator<A> = Redux.ActionCreator<A>;
|
||||
|
||||
interface ComponentDecorator<TOriginalProps, TOwnProps> {
|
||||
(component: ComponentClass<TOriginalProps>|StatelessComponent<TOriginalProps>): ComponentClass<TOwnProps>;
|
||||
@@ -101,5 +105,9 @@ declare module "react-redux" {
|
||||
/**
|
||||
* Makes the Redux store available to the connect() calls in the component hierarchy below.
|
||||
*/
|
||||
export class Provider extends Component<ProviderProps, {}> { }
|
||||
export class Provider extends __React.Component<ProviderProps, {}> { }
|
||||
}
|
||||
|
||||
declare module "react-redux" {
|
||||
export = ReactRedux;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user