mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[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:
parent
fac8421264
commit
f487a1c111
2
types/react/index.d.ts
vendored
2
types/react/index.d.ts
vendored
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user