Open
Description
The Flow type definition of the element
argument is found in src/element.js
:
export type UserElement = {
type: ComponentType<DefaultProps> & ComponentStatics,
props: DefaultProps,
$$typeof: typeof REACT_ELEMENT_TYPE
}
In scripts/react-ssr-prepass.d.ts
this type is mapped to React.ElementType<any>
. However, the type defined above more accurately would be mapped to React.ReactElement<any>
(see @types/react)
Metadata
Metadata
Assignees
Labels
No labels