From 4ca6b7a315a896244de541905cd918c387b0d604 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 5 Nov 2024 17:03:36 +0000 Subject: [PATCH] Update React Native shims to use export syntax --- scripts/rollup/shims/react-native/ReactFabric.js | 4 ++-- scripts/rollup/shims/react-native/ReactFeatureFlags.js | 2 +- scripts/rollup/shims/react-native/ReactNative.js | 4 ++-- .../shims/react-native/createReactNativeComponentClass.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/rollup/shims/react-native/ReactFabric.js b/scripts/rollup/shims/react-native/ReactFabric.js index 61f6d726887b3..69fb77af69a86 100644 --- a/scripts/rollup/shims/react-native/ReactFabric.js +++ b/scripts/rollup/shims/react-native/ReactFabric.js @@ -15,7 +15,7 @@ import {BatchedBridge} from 'react-native/Libraries/ReactPrivate/ReactNativePriv import type {ReactFabricType} from './ReactNativeTypes'; -let ReactFabric; +let ReactFabric: ReactFabricType; if (__DEV__) { ReactFabric = require('../implementations/ReactFabric-dev'); @@ -29,4 +29,4 @@ if (global.RN$Bridgeless !== true) { BatchedBridge.registerCallableModule('ReactFabric', ReactFabric); } -module.exports = (ReactFabric: ReactFabricType); +export default ReactFabric; diff --git a/scripts/rollup/shims/react-native/ReactFeatureFlags.js b/scripts/rollup/shims/react-native/ReactFeatureFlags.js index 69e6f48b68a34..3f8f278e972a4 100644 --- a/scripts/rollup/shims/react-native/ReactFeatureFlags.js +++ b/scripts/rollup/shims/react-native/ReactFeatureFlags.js @@ -15,4 +15,4 @@ const ReactFeatureFlags = { debugRenderPhaseSideEffects: false, }; -module.exports = ReactFeatureFlags; +export default ReactFeatureFlags; diff --git a/scripts/rollup/shims/react-native/ReactNative.js b/scripts/rollup/shims/react-native/ReactNative.js index d0297cc9a61cb..82c062bb85123 100644 --- a/scripts/rollup/shims/react-native/ReactNative.js +++ b/scripts/rollup/shims/react-native/ReactNative.js @@ -12,7 +12,7 @@ import type {ReactNativeType} from './ReactNativeTypes'; -let ReactNative; +let ReactNative: ReactNativeType; if (__DEV__) { ReactNative = require('../implementations/ReactNativeRenderer-dev'); @@ -20,4 +20,4 @@ if (__DEV__) { ReactNative = require('../implementations/ReactNativeRenderer-prod'); } -module.exports = (ReactNative: ReactNativeType); +export default ReactNative; diff --git a/scripts/rollup/shims/react-native/createReactNativeComponentClass.js b/scripts/rollup/shims/react-native/createReactNativeComponentClass.js index 388991e45b545..42ea979daef3e 100644 --- a/scripts/rollup/shims/react-native/createReactNativeComponentClass.js +++ b/scripts/rollup/shims/react-native/createReactNativeComponentClass.js @@ -31,4 +31,4 @@ const createReactNativeComponentClass = function ( return register(name, callback); }; -module.exports = createReactNativeComponentClass; +export default createReactNativeComponentClass;