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 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 };