[react] Fix isValidElement to accept any type (#20641)

* [react] Fix `isValidElement` to accept `any` type

* [react] Fix `isValidElement` method param type

Change `object` parameter type from `any` to more explicit.
This commit is contained in:
Richard Jedlička 2017-10-17 20:58:39 +02:00 committed by Andy
parent fac8421264
commit f487a1c111

View File

@ -256,7 +256,7 @@ declare namespace React {
props?: Q, // should be Q & Attributes
...children: ReactNode[]): ReactElement<P>;
function isValidElement<P>(object: {}): object is ReactElement<P>;
function isValidElement<P>(object: {} | null | undefined): object is ReactElement<P>;
const Children: ReactChildren;
const version: string;