Files
react-native/Libraries/StyleSheet
Steve Alves-Blyt 32d03c250c Add missing type objectFit prop in image style type definition (#36249)
Summary:
Following the [`initial commit`](https://github.com/facebook/react-native/commit/b2452ab216e28e004dc625dd8e1ad32351a79be9), the `objectFit` property have been implemented. However, it is not declared in the Typescript type files, making it unknown to the typescript compiler. Thus, when using this property in Typescript, we have the following issue:

![Capture d’écran 2023-02-22 à 14 52 04](https://user-images.githubusercontent.com/29439916/220639885-947dddb1-5e6f-4f60-b423-882ade29ac5a.png)

Then, the purpose of this PR is to fix that by adding the missing property to the `ImageStyle` interface defined in the`StyleSheetTypes.d.ts` file.

## Changelog

[GENERAL][FIXED] Add objectFit to the ImageStyle interface located in the StyleSheetTypes.d.ts file

Pull Request resolved: https://github.com/facebook/react-native/pull/36249

Test Plan:
To test it, create/use a typescript file and call the `Image` component with a `style` property. Then, check if the autocompletion provides you the right properties with the right type. For example:

![Capture d’écran 2023-02-22 à 14 34 58](https://user-images.githubusercontent.com/29439916/220636819-4c0d80dc-bc3a-468d-bcfc-782e038918ca.png)
![Capture d’écran 2023-02-22 à 14 35 46](https://user-images.githubusercontent.com/29439916/220636863-76a84122-0cdb-4d5d-8edf-309ed7c876f7.png)

Reviewed By: NickGerleman, rshest

Differential Revision: D43665291

Pulled By: motiz88

fbshipit-source-id: bf136b8aeb9dd25ff0e696b747ef5805acf8028c
2023-02-28 12:03:08 -08:00
..
2022-09-30 14:28:48 -07:00
2023-02-28 10:23:36 -08:00
2022-12-06 19:34:14 -08:00
2023-01-03 18:09:06 -08:00
2023-02-28 10:23:36 -08:00