From 82057699d4b2425dae19dbc493192fd3b085817c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ma=C5=82ecki?= Date: Fri, 17 Jan 2025 06:55:49 -0800 Subject: [PATCH] Replace $FlowFixMe in NativeModules Summary: Changelog: [General][Changed] - Replaced $FlowFixMe in NativeModules with any type Differential Revision: D68327176 --- packages/react-native/Libraries/BatchedBridge/NativeModules.js | 3 ++- .../Libraries/__tests__/__snapshots__/public-api-test.js.snap | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/BatchedBridge/NativeModules.js b/packages/react-native/Libraries/BatchedBridge/NativeModules.js index a421b0b82a70..aad6de50299d 100644 --- a/packages/react-native/Libraries/BatchedBridge/NativeModules.js +++ b/packages/react-native/Libraries/BatchedBridge/NativeModules.js @@ -176,7 +176,8 @@ function updateErrorWithErrorData( return Object.assign(error, errorData || {}); } -let NativeModules: {[moduleName: string]: $FlowFixMe, ...} = {}; +/* $FlowFixMe[unclear-type] unclear type of NativeModules */ +let NativeModules: {[moduleName: string]: any, ...} = {}; if (global.nativeModuleProxy) { NativeModules = global.nativeModuleProxy; } else { 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 28bfe0a27f00..0a937d7cdc50 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 @@ -1348,7 +1348,7 @@ exports[`public API should not change unintentionally Libraries/BatchedBridge/Na ?$ReadOnlyArray, ]; export type MethodType = \\"async\\" | \\"promise\\" | \\"sync\\"; -declare let NativeModules: { [moduleName: string]: $FlowFixMe, ... }; +declare let NativeModules: { [moduleName: string]: any, ... }; declare module.exports: NativeModules; " `;