From 7269a2da7979dc8b92cc53fd9dcf99d89d6325d8 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Mon, 14 Apr 2025 05:12:31 -0700 Subject: [PATCH] Update React types usage in ImageProps (#50541) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50541 Changelog: [Internal] Reviewed By: huntie Differential Revision: D72624527 fbshipit-source-id: ffdce30b010e2425bc805d800f70be5eaf2b3fed --- packages/react-native/Libraries/Image/ImageProps.js | 5 ++--- .../__tests__/__snapshots__/public-api-test.js.snap | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/react-native/Libraries/Image/ImageProps.js b/packages/react-native/Libraries/Image/ImageProps.js index 26c65d03f46..7b7e372fda0 100644 --- a/packages/react-native/Libraries/Image/ImageProps.js +++ b/packages/react-native/Libraries/Image/ImageProps.js @@ -21,10 +21,9 @@ import type { LayoutChangeEvent, NativeSyntheticEvent, } from '../Types/CoreEventTypes'; -import type {ImageType} from './ImageTypes.flow'; import type {ImageResizeMode} from './ImageResizeMode'; import type {ImageSource, ImageURISource} from './ImageSource'; -import type {ElementRef, RefSetter} from 'react'; +import type {ImageType} from './ImageTypes.flow'; import * as React from 'react'; @@ -368,5 +367,5 @@ export type ImageBackgroundProps = $ReadOnly<{ * * See https://reactnative.dev/docs/imagebackground#imageref */ - imageRef?: RefSetter>, + imageRef?: React.RefSetter>, }>; diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index 5b79397c8e4..0140776d525 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -4369,7 +4369,7 @@ export type ImageBackgroundProps = $ReadOnly<{ children?: React.Node, style?: ?ViewStyleProp, imageStyle?: ?ImageStyleProp, - imageRef?: RefSetter>, + imageRef?: React.RefSetter>, }>; " `;