diff --git a/types/react/index.d.ts b/types/react/index.d.ts index fa5d1753066c07..4ab1e67ed7a16b 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -725,6 +725,7 @@ declare namespace React { // but can be given its own specific name interface ForwardRefExoticComponent

extends NamedExoticComponent

{ defaultProps?: Partial

; + propTypes?: WeakValidationMap

; } function forwardRef(Component: RefForwardingComponent): ForwardRefExoticComponent & RefAttributes>; diff --git a/types/react/test/index.ts b/types/react/test/index.ts index 8787c19d629888..7ab3cc4d33317e 100644 --- a/types/react/test/index.ts +++ b/types/react/test/index.ts @@ -402,6 +402,9 @@ const ForwardingRefComponent = React.forwardRef((props: {}, ref: React.Ref = {}; +ForwardingRefComponent.propTypes = ForwardingRefComponentPropTypes; + function RefCarryingComponent() { const ref: React.RefObject = React.createRef(); // Without the explicit type argument, TypeScript infers `{ref: React.RefObject}`