react - Replaced any with {} for context

See https://github.com/Microsoft/TypeScript/issues/4126
This commit is contained in:
Ciuca, Alexandru
2015-08-04 11:10:07 +03:00
parent b0d313e1b1
commit 1a9ee560ef
5 changed files with 7 additions and 3 deletions
+2
View File
@@ -84,6 +84,8 @@ class ModernComponent extends React.Component<Props, State>
someOtherValue: React.PropTypes.string
}
context: Context;
getChildContext() {
return {
someOtherValue: 'foo'
+1 -1
View File
@@ -137,7 +137,7 @@ declare module "react/addons" {
forceUpdate(): void;
props: P;
state: S;
context: any;
context: {};
refs: {
[key: string]: Component<any, any>
};
+1 -1
View File
@@ -138,7 +138,7 @@ declare module React {
forceUpdate(): void;
props: P;
state: S;
context: any;
context: {};
refs: {
[key: string]: Component<any, any>
};
+2
View File
@@ -82,6 +82,8 @@ class ModernComponent extends React.Component<Props, State>
someOtherValue: React.PropTypes.string
}
context: Context;
getChildContext() {
return {
someOtherValue: 'foo'
+1 -1
View File
@@ -138,7 +138,7 @@ declare module __React {
forceUpdate(): void;
props: P;
state: S;
context: any;
context: {};
refs: {
[key: string]: Component<any, any>
};