Skip to content

Commit c129457

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Typing ViewProp, ImageProp
Summary: Tightening these types. We can't type TextProp the same way yet because of something fishy in Flow: https://flow.org/try/#0KYDwDg9gTgLgBDAnmYcAqoYGUkBtUC8cA3gD4BQccAZhAHYwBiAhgLYCWuiAXHAM4wo7OgHMANJRr1s7AF7BedAK6sARsCgTSAXwDc5cqEiwEyVIwAiWRtJyJ8cImUm0GLDl14ChorXoNG0PBIKOiYdvgAClAQYI5wACQASsDMACYA8nRcADwJWAAWzCg5GCDYeMAAfFW6cAD09XAprBAAbqjJqZnZiHDMdGkIBagaMVBwIhDAfP0A7syIBgDG9AJwllgRChtWNgzb8cQu0u6cPHAA5LQQlxL+5Kt062UV9sAAasxQvK-b0bF4pttrogA Reviewed By: olegbl Differential Revision: D7165134 fbshipit-source-id: 2fd3de2af8bdc53231d59de71def1e6a7221aff7
1 parent d7b5b2e commit c129457

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Libraries/StyleSheet/StyleSheetTypes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ export type StyleProp<+T> =
241241
export type StyleObj = StyleProp<$Shape<Style>>;
242242
export type StyleValue = StyleObj;
243243

244-
export type ViewStyleProp = StyleObj;
244+
export type ViewStyleProp = StyleProp<$ReadOnly<$Shape<ViewStyle>>>;
245245
export type TextStyleProp = StyleObj;
246-
export type ImageStyleProp = StyleObj;
246+
export type ImageStyleProp = StyleProp<$ReadOnly<$Shape<ImageStyle>>>;
247247

248248
export type Styles = {
249249
+[key: string]: $Shape<Style>,

0 commit comments

Comments
 (0)