From 354c730cd938f3f2c179c244a473b806be95490f Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Wed, 23 Feb 2022 03:50:16 +0900 Subject: [PATCH] Change `Ref` to `ForwardedRef` --- packages/components/src/ui/context/context-connect.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/src/ui/context/context-connect.ts b/packages/components/src/ui/context/context-connect.ts index c6d20162847a2a..63aba66e42d778 100644 --- a/packages/components/src/ui/context/context-connect.ts +++ b/packages/components/src/ui/context/context-connect.ts @@ -2,7 +2,7 @@ * External dependencies */ import { uniq } from 'lodash'; -import type { ReactChild, ReactNode, Ref } from 'react'; +import type { ForwardedRef, ReactChild, ReactNode } from 'react'; /** * WordPress dependencies @@ -36,7 +36,7 @@ type ContextConnectOptions = { * @return The connected WordPressComponent */ export function contextConnect< P >( - Component: ( props: P, ref: Ref< any > ) => JSX.Element | null, + Component: ( props: P, ref: ForwardedRef< any > ) => JSX.Element | null, namespace: string, options: ContextConnectOptions = {} ): WordPressComponentFromProps< P > {