mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-08 17:19:27 +08: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:
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;
|
||||
|
||||
Reference in New Issue
Block a user