Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update React Native shims to use export syntax #31426

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/rollup/shims/react-native/ReactFabric.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -29,4 +29,4 @@ if (global.RN$Bridgeless !== true) {
BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
}

module.exports = (ReactFabric: ReactFabricType);
export default ReactFabric;
2 changes: 1 addition & 1 deletion scripts/rollup/shims/react-native/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ const ReactFeatureFlags = {
debugRenderPhaseSideEffects: false,
};

module.exports = ReactFeatureFlags;
export default ReactFeatureFlags;
4 changes: 2 additions & 2 deletions scripts/rollup/shims/react-native/ReactNative.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

import type {ReactNativeType} from './ReactNativeTypes';

let ReactNative;
let ReactNative: ReactNativeType;

if (__DEV__) {
ReactNative = require('../implementations/ReactNativeRenderer-dev');
} else {
ReactNative = require('../implementations/ReactNativeRenderer-prod');
}

module.exports = (ReactNative: ReactNativeType);
export default ReactNative;
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ const createReactNativeComponentClass = function (
return register(name, callback);
};

module.exports = createReactNativeComponentClass;
export default createReactNativeComponentClass;
Loading