From 68ae3ca5e97ac1e0a6d01986ddd2a306f7543eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ma=C5=82ecki?= Date: Thu, 16 Jan 2025 02:04:05 -0800 Subject: [PATCH] Change flatten import syntax in StyleSheet (#48705) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48705 Changelog: [Internal] - Changed flatten import syntax in StyleSheet Reviewed By: elicwhite Differential Revision: D68213648 fbshipit-source-id: bf6c33387ae9d36b6ce41b57639948c2b4902e55 --- packages/react-native/Libraries/StyleSheet/StyleSheet.js | 2 +- .../Libraries/__tests__/__snapshots__/public-api-test.js.snap | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/react-native/Libraries/StyleSheet/StyleSheet.js b/packages/react-native/Libraries/StyleSheet/StyleSheet.js index c8531f9950d..a57a8d9e634 100644 --- a/packages/react-native/Libraries/StyleSheet/StyleSheet.js +++ b/packages/react-native/Libraries/StyleSheet/StyleSheet.js @@ -24,10 +24,10 @@ import type { } from './StyleSheetTypes'; import composeStyles from '../../src/private/styles/composeStyles'; +import flatten from './flattenStyle'; const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes'); const PixelRatio = require('../Utilities/PixelRatio').default; -const flatten = require('./flattenStyle'); export type {NativeColorValue} from './StyleSheetTypes'; 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 0a7ec0d517b..94733867cd5 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 @@ -7827,8 +7827,7 @@ declare export function normalizeRect(rectOrSize: ?RectOrSize): ?Rect; `; exports[`public API should not change unintentionally Libraries/StyleSheet/StyleSheet.js 1`] = ` -"declare const flatten: $FlowFixMe; -export type { NativeColorValue } from \\"./StyleSheetTypes\\"; +"export type { NativeColorValue } from \\"./StyleSheetTypes\\"; export type ColorValue = ____ColorValue_Internal; export type ViewStyleProp = ____ViewStyleProp_Internal; export type TextStyleProp = ____TextStyleProp_Internal;