Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing type for TextInput.readOnly in Typescript (#39281)
Summary: The `readOnly` prop is available in the `TextInput` implementation (see [usage https://github.com/facebook/react-native/issues/1](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/TextInput/TextInput.js#L1646), [usage https://github.com/facebook/react-native/issues/2](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/TextInput/TextInput.js#L1671)), but the corresponding Typescript type is currently missing. Those who use Typescript get an invalid prop error when using the `readOnly` prop on `TextInput`. Having this prop type included in TypeScript would fix the bug above and also would be beneficial for consistency and comprehensive type support. Notably, this prop is also included in the Flow types [here](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/TextInput/TextInput.flow.js#L814). ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [GENERAL] [FIXED] - Add missing type for TextInput.readOnly in Typescript Pull Request resolved: #39281 Test Plan: N/A Reviewed By: rshest Differential Revision: D48955477 Pulled By: NickGerleman fbshipit-source-id: 9d3431351b8ad65a4d2fc57939b98c167dc70cee
- Loading branch information