import * as React from 'react' import { ReactElement, MutableRefObject } from 'react' export type RefProp = MutableRefObject // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34237 export type ElementType

= | React.ElementType

| LeafFunctionComponent

// Function component without children type LeafFunctionComponent

= { (props: P): ReactElement | null displayName?: string } export type ComponentPropsWithRef< T extends ElementType > = T extends React.ComponentClass ? React.PropsWithoutRef

& React.RefAttributes> : React.PropsWithRef> // In @types/react, a "children" prop is required by the "FunctionComponent" type. export type ComponentType

= | React.ComponentClass

| LeafFunctionComponent