mirror of
https://github.com/status-im/react-native.git
synced 2025-02-26 08:05:34 +00:00
Remove usage of Styles type
Summary: This type was often used when (View|Text|Image)StyleProp should have been used instead. Since there were no valid usages of it in our codebase, we are not making it public anymore. Reviewed By: yungsters Differential Revision: D7188658 fbshipit-source-id: 7112cc4a7da7b007b5c758a0890d2e0b8fe1797a
This commit is contained in:
parent
d89517d60a
commit
852084ad45
@ -18,7 +18,7 @@ const flatten = require('flattenStyle');
|
||||
|
||||
import type {
|
||||
____StyleSheetInternalStyleIdentifier_Internal as StyleSheetInternalStyleIdentifier,
|
||||
Styles as _Styles,
|
||||
____Styles_Internal,
|
||||
____StyleObj_Internal,
|
||||
____ViewStyleProp_Internal,
|
||||
____TextStyleProp_Internal,
|
||||
@ -31,8 +31,6 @@ export type ViewStyleProp = ____ViewStyleProp_Internal;
|
||||
export type TextStyleProp = ____TextStyleProp_Internal;
|
||||
export type ImageStyleProp = ____ImageStyleProp_Internal;
|
||||
|
||||
export type Styles = _Styles;
|
||||
|
||||
let hairlineWidth = PixelRatio.roundToNearestPixel(0.4);
|
||||
if (hairlineWidth === 0) {
|
||||
hairlineWidth = 1 / PixelRatio.get();
|
||||
@ -221,7 +219,7 @@ module.exports = {
|
||||
/**
|
||||
* Creates a StyleSheet style reference from the given object.
|
||||
*/
|
||||
create<+S: Styles>(obj: S): $ObjMap<S, (Object) => StyleSheetInternalStyleIdentifier> {
|
||||
create<+S: ____Styles_Internal>(obj: S): $ObjMap<S, (Object) => StyleSheetInternalStyleIdentifier> {
|
||||
const result = {};
|
||||
for (const key in obj) {
|
||||
StyleSheetValidation.validateStyle(key, obj);
|
||||
|
@ -241,7 +241,7 @@ export type ____ImageStyleProp_Internal = GenericStyleProp<
|
||||
$ReadOnly<$Shape<ImageStyle>>,
|
||||
>;
|
||||
|
||||
export type Styles = {
|
||||
export type ____Styles_Internal = {
|
||||
+[key: string]: $Shape<Style>,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user