@@ -75,7 +75,7 @@ declare namespace React {
7575 type ComponentType < P = { } > = ComponentClass < P > | FunctionComponent < P > ;
7676
7777 type JSXElementConstructor < P > =
78- | ( ( props : P ) => ReactElement < any , any > | null )
78+ | ( ( props : P ) => ReactNode )
7979 | ( new ( props : P ) => Component < any , any > ) ;
8080
8181 interface RefObject < T > {
@@ -347,7 +347,7 @@ declare namespace React {
347347 /**
348348 * **NOTE**: Exotic components are not callable.
349349 */
350- ( props : P ) : ( ReactElement | null ) ;
350+ ( props : P ) : ReactNode ;
351351 readonly $$typeof : symbol ;
352352 }
353353
@@ -517,7 +517,7 @@ declare namespace React {
517517 type FC < P = { } > = FunctionComponent < P > ;
518518
519519 interface FunctionComponent < P = { } > {
520- ( props : P , context ?: any ) : ReactElement < any , any > | null ;
520+ ( props : P , context ?: any ) : ReactNode ;
521521 propTypes ?: WeakValidationMap < P > | undefined ;
522522 contextTypes ?: ValidationMap < any > | undefined ;
523523 defaultProps ?: Partial < P > | undefined ;
@@ -533,7 +533,7 @@ declare namespace React {
533533 * @deprecated - Equivalent with `React.FunctionComponent`.
534534 */
535535 interface VoidFunctionComponent < P = { } > {
536- ( props : P , context ?: any ) : ReactElement < any , any > | null ;
536+ ( props : P , context ?: any ) : ReactNode ;
537537 propTypes ?: WeakValidationMap < P > | undefined ;
538538 contextTypes ?: ValidationMap < any > | undefined ;
539539 defaultProps ?: Partial < P > | undefined ;
@@ -543,7 +543,7 @@ declare namespace React {
543543 type ForwardedRef < T > = ( ( instance : T | null ) => void ) | MutableRefObject < T | null > | null ;
544544
545545 interface ForwardRefRenderFunction < T , P = { } > {
546- ( props : P , ref : ForwardedRef < T > ) : ReactElement | null ;
546+ ( props : P , ref : ForwardedRef < T > ) : ReactNode ;
547547 displayName ?: string | undefined ;
548548 // explicit rejected with `never` required due to
549549 // https://github.com/microsoft/TypeScript/issues/36826
@@ -3119,7 +3119,7 @@ type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps
31193119
31203120declare global {
31213121 namespace JSX {
3122- interface Element extends React . ReactElement < any , any > { }
3122+ type Element = any ;
31233123 interface ElementClass extends React . Component < any > {
31243124 render ( ) : React . ReactNode ;
31253125 }
0 commit comments