From 9a29264ffb345dd7af2559ed99d803a44f81981f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ma=C5=82ecki?= Date: Thu, 16 Jan 2025 02:08:37 -0800 Subject: [PATCH] Set explicit types in I18nManager exports Summary: Changelog: [Internal] - Added explicit types in I18nManager exports Reviewed By: elicwhite Differential Revision: D68214193 fbshipit-source-id: 960ef7b9c0171aed983f4db620bb895ccbff6cd2 --- packages/react-native/Libraries/ReactNative/I18nManager.js | 5 +++-- .../__tests__/__snapshots__/public-api-test.js.snap | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/react-native/Libraries/ReactNative/I18nManager.js b/packages/react-native/Libraries/ReactNative/I18nManager.js index 1c3225638e9..bac35c8f89d 100644 --- a/packages/react-native/Libraries/ReactNative/I18nManager.js +++ b/packages/react-native/Libraries/ReactNative/I18nManager.js @@ -56,6 +56,7 @@ module.exports = { NativeI18nManager.swapLeftAndRightInRTL(flipStyles); }, - isRTL: i18nConstants.isRTL, - doLeftAndRightSwapInRTL: i18nConstants.doLeftAndRightSwapInRTL, + isRTL: i18nConstants.isRTL as I18nManagerConstants['isRTL'], + doLeftAndRightSwapInRTL: + i18nConstants.doLeftAndRightSwapInRTL as I18nManagerConstants['doLeftAndRightSwapInRTL'], }; 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 4ee2bbbb3b5..85a4f1c8cd2 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 @@ -7489,8 +7489,8 @@ exports[`public API should not change unintentionally Libraries/ReactNative/I18n allowRTL: (shouldAllow: boolean) => void, forceRTL: (shouldForce: boolean) => void, swapLeftAndRightInRTL: (flipStyles: boolean) => void, - isRTL: $FlowFixMe, - doLeftAndRightSwapInRTL: $FlowFixMe, + isRTL: I18nManagerConstants[\\"isRTL\\"], + doLeftAndRightSwapInRTL: I18nManagerConstants[\\"doLeftAndRightSwapInRTL\\"], }; " `;