mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
react - Replaced any with {} for context
See https://github.com/Microsoft/TypeScript/issues/4126
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'
|
||||
|
||||
2
react/react-addons.d.ts
vendored
2
react/react-addons.d.ts
vendored
@@ -137,7 +137,7 @@ declare module "react/addons" {
|
||||
forceUpdate(): void;
|
||||
props: P;
|
||||
state: S;
|
||||
context: any;
|
||||
context: {};
|
||||
refs: {
|
||||
[key: string]: Component<any, any>
|
||||
};
|
||||
|
||||
2
react/react-global.d.ts
vendored
2
react/react-global.d.ts
vendored
@@ -138,7 +138,7 @@ declare module React {
|
||||
forceUpdate(): void;
|
||||
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'
|
||||
|
||||
2
react/react.d.ts
vendored
2
react/react.d.ts
vendored
@@ -138,7 +138,7 @@ declare module __React {
|
||||
forceUpdate(): void;
|
||||
props: P;
|
||||
state: S;
|
||||
context: any;
|
||||
context: {};
|
||||
refs: {
|
||||
[key: string]: Component<any, any>
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user