From 1126bbb1493dbea04addfdcc809ace01aecab604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ma=C5=82ecki?= Date: Wed, 15 Jan 2025 08:15:37 -0800 Subject: [PATCH] Add explicit type to supported commands in TextInputNativeCommands (#48688) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48688 Changelog: [General][Changed] - Added explicit type to supported commands in TextInputNativeCommands Reviewed By: cortinico Differential Revision: D68205568 fbshipit-source-id: 53501cdeaf4d790b36156b59f76686e8fef5cc5f --- .../Libraries/Components/TextInput/TextInputNativeCommands.js | 2 +- .../Libraries/__tests__/__snapshots__/public-api-test.js.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/Components/TextInput/TextInputNativeCommands.js b/packages/react-native/Libraries/Components/TextInput/TextInputNativeCommands.js index e64262ae37d..9da88998c47 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInputNativeCommands.js +++ b/packages/react-native/Libraries/Components/TextInput/TextInputNativeCommands.js @@ -24,6 +24,6 @@ export interface TextInputNativeCommands { ) => void; } -const supportedCommands = ['focus', 'blur', 'setTextAndSelection']; +const supportedCommands = ['focus', 'blur', 'setTextAndSelection'] as string[]; export default supportedCommands; 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 d918673f27c..68a17bf85b8 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 @@ -3513,7 +3513,7 @@ exports[`public API should not change unintentionally Libraries/Components/TextI end: Int32 ) => void; } -declare const supportedCommands: $FlowFixMe; +declare const supportedCommands: string[]; declare export default typeof supportedCommands; " `;