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:03:12 +03:00
parent b0d313e1b1
commit 1a9ee560ef
5 changed files with 7 additions and 3 deletions

View File

@@ -84,6 +84,8 @@ class ModernComponent extends React.Component<Props, State>
someOtherValue: React.PropTypes.string
}
context: Context;
getChildContext() {
return {
someOtherValue: 'foo'

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

View File

@@ -138,7 +138,7 @@ declare module React {
forceUpdate(): void;
props: P;
state: S;
context: any;
context: {};
refs: {
[key: string]: Component<any, any>
};

View File

@@ -82,6 +82,8 @@ class ModernComponent extends React.Component<Props, State>
someOtherValue: React.PropTypes.string
}
context: Context;
getChildContext() {
return {
someOtherValue: 'foo'

2
react/react.d.ts vendored
View File

@@ -138,7 +138,7 @@ declare module __React {
forceUpdate(): void;
props: P;
state: S;
context: any;
context: {};
refs: {
[key: string]: Component<any, any>
};