diff --git a/react/react-addons-tests.ts b/react/react-addons-tests.ts index 492fe4d817..6976d9959d 100644 --- a/react/react-addons-tests.ts +++ b/react/react-addons-tests.ts @@ -84,6 +84,8 @@ class ModernComponent extends React.Component someOtherValue: React.PropTypes.string } + context: Context; + getChildContext() { return { someOtherValue: 'foo' diff --git a/react/react-addons.d.ts b/react/react-addons.d.ts index 37cde636dc..49c8ab0ba6 100644 --- a/react/react-addons.d.ts +++ b/react/react-addons.d.ts @@ -137,7 +137,7 @@ declare module "react/addons" { forceUpdate(): void; props: P; state: S; - context: any; + context: {}; refs: { [key: string]: Component }; diff --git a/react/react-global.d.ts b/react/react-global.d.ts index 3c1a69e439..3f261297b2 100644 --- a/react/react-global.d.ts +++ b/react/react-global.d.ts @@ -138,7 +138,7 @@ declare module React { forceUpdate(): void; props: P; state: S; - context: any; + context: {}; refs: { [key: string]: Component }; diff --git a/react/react-tests.ts b/react/react-tests.ts index 1fd2670dec..a4d2c4f7ac 100644 --- a/react/react-tests.ts +++ b/react/react-tests.ts @@ -82,6 +82,8 @@ class ModernComponent extends React.Component someOtherValue: React.PropTypes.string } + context: Context; + getChildContext() { return { someOtherValue: 'foo' diff --git a/react/react.d.ts b/react/react.d.ts index 5fbad0d227..1e5c358992 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -138,7 +138,7 @@ declare module __React { forceUpdate(): void; props: P; state: S; - context: any; + context: {}; refs: { [key: string]: Component };