Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[fixed] React.PropTypes is deprecated in favor of the `"prop-types"…
Browse files Browse the repository at this point in the history
…` module
  • Loading branch information
thealjey committed Apr 21, 2017
1 parent edaa3ef commit 2e7d0ba
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions interfaces/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

declare module 'react' {
declare function createElement(type: any, props?: Object, ...children: any[]): void;
declare var PropTypes: {
declare class Component {}
declare class PureComponent {}
}

declare module 'react/lib/shallowCompare' {
declare function exports(component: any, props: Object, state: Object): boolean;
}

declare module 'prop-types' {
declare var exports: {
instanceOf(obj: any): void;
arrayOf(obj: any): void;
oneOfType(types: any[]): void;
Expand All @@ -14,10 +23,4 @@ declare module 'react' {
number: {isRequired: void};
func: {isRequired: void};
};
declare class Component {}
declare class PureComponent {}
}

declare module 'react/lib/shallowCompare' {
declare function exports(component: any, props: Object, state: Object): boolean;
}

0 comments on commit 2e7d0ba

Please sign in to comment.