Open TheSonOfThomp opened 1 year ago
The Flow type definition of the element argument is found in src/element.js:
element
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)
scripts/react-ssr-prepass.d.ts
React.ElementType<any>
React.ReactElement<any>
The Flow type definition of the
element
argument is found insrc/element.js
:In
scripts/react-ssr-prepass.d.ts
this type is mapped toReact.ElementType<any>
. However, the type defined above more accurately would be mapped toReact.ReactElement<any>
(see @types/react)