mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #5201 from use-strict/react-context-any
react - Replaced context any with {} for type safety.
This commit is contained in:
@@ -84,6 +84,8 @@ class ModernComponent extends React.Component<Props, State>
|
||||
someOtherValue: React.PropTypes.string
|
||||
}
|
||||
|
||||
context: Context;
|
||||
|
||||
getChildContext() {
|
||||
return {
|
||||
someOtherValue: 'foo'
|
||||
|
||||
Vendored
+1
-1
@@ -137,7 +137,7 @@ declare module "react/addons" {
|
||||
forceUpdate(): void;
|
||||
props: P;
|
||||
state: S;
|
||||
context: any;
|
||||
context: {};
|
||||
refs: {
|
||||
[key: string]: Component<any, any>
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -139,7 +139,7 @@ declare module React {
|
||||
render(): JSX.Element;
|
||||
props: P;
|
||||
state: S;
|
||||
context: any;
|
||||
context: {};
|
||||
refs: {
|
||||
[key: string]: Component<any, any>
|
||||
};
|
||||
|
||||
@@ -82,6 +82,8 @@ class ModernComponent extends React.Component<Props, State>
|
||||
someOtherValue: React.PropTypes.string
|
||||
}
|
||||
|
||||
context: Context;
|
||||
|
||||
getChildContext() {
|
||||
return {
|
||||
someOtherValue: 'foo'
|
||||
|
||||
Vendored
+1
-1
@@ -139,7 +139,7 @@ declare module __React {
|
||||
render(): JSX.Element;
|
||||
props: P;
|
||||
state: S;
|
||||
context: any;
|
||||
context: {};
|
||||
refs: {
|
||||
[key: string]: Component<any, any>
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user