Permalink
Browse files

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
  • Loading branch information...
TheSavior authored and facebook-github-bot committed Mar 8, 2018
1 parent d89517d commit 852084ad454565bb856e85f09e098f1a4a0771a6
Showing with 3 additions and 5 deletions.
  1. +2 −4 Libraries/StyleSheet/StyleSheet.js
  2. +1 −1 Libraries/StyleSheet/StyleSheetTypes.js
@@ -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>,
};

0 comments on commit 852084a

Please sign in to comment.