From 1a9ee560ef02abec59b6e2218c585be93905cfbb Mon Sep 17 00:00:00 2001 From: "Ciuca, Alexandru" Date: Tue, 4 Aug 2015 11:03:12 +0300 Subject: [PATCH] react - Replaced any with {} for context See https://github.com/Microsoft/TypeScript/issues/4126 --- react/react-addons-tests.ts | 2 ++ react/react-addons.d.ts | 2 +- react/react-global.d.ts | 2 +- react/react-tests.ts | 2 ++ react/react.d.ts | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) 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 };