diff --git a/react/react-addons-tests.ts b/react/react-addons-tests.ts index 492fe4d81..6976d9959 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 37cde636d..49c8ab0ba 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 3c1a69e43..3f261297b 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 1fd2670de..a4d2c4f7a 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 5fbad0d22..1e5c35899 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 };