From 6b287c0f2fa7ad3862d0549f8aff7ae8bac3293c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 6 Jun 2025 06:43:33 -0700 Subject: [PATCH] Add Types to simplify the SPM build process (#51847) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51847 This change introduces a types.js to add some useful flow types to build React Native with Swift PM. ## Changelog: [Internal] - Reviewed By: cortinico Differential Revision: D76045454 fbshipit-source-id: 352e9f1a2845106c49461c3ac66188f49b520eb3 --- .../scripts/ios-prebuild/types.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 packages/react-native/scripts/ios-prebuild/types.js diff --git a/packages/react-native/scripts/ios-prebuild/types.js b/packages/react-native/scripts/ios-prebuild/types.js new file mode 100644 index 00000000000..1f7430c198e --- /dev/null +++ b/packages/react-native/scripts/ios-prebuild/types.js @@ -0,0 +1,23 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + * @format + */ + +/*:: +export type Platform = + 'ios' | + 'ios-simulator' | + 'mac-catalyst'; + +export type Destination = + 'iOS' | + 'iOS Simulator' | + 'macOS,variant=Mac Catalyst'; +*/ + +module.exports = {};