From 96cc3dddbcf3a7e3051bf74af47ab26774607ca9 Mon Sep 17 00:00:00 2001 From: "Rafael Nunes G. da Silveira" Date: Thu, 27 Sep 2018 00:54:08 -0300 Subject: [PATCH 1/2] Move PropTypes definition to DeprecatedPointPropType --- .../DeprecatedPointPropType.js | 20 +++++++++++++++++++ Libraries/StyleSheet/PointPropType.js | 9 +-------- 2 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js diff --git a/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js b/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js new file mode 100644 index 00000000000000..9ae8c8f9872d5c --- /dev/null +++ b/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @flow strict + */ + +'use strict'; + +const PropTypes = require('prop-types'); + +const PointPropType = PropTypes.shape({ + x: PropTypes.number, + y: PropTypes.number, +}); + +module.exports = PointPropType; diff --git a/Libraries/StyleSheet/PointPropType.js b/Libraries/StyleSheet/PointPropType.js index be8a5296eb85e7..fd9e6a61ad40d7 100644 --- a/Libraries/StyleSheet/PointPropType.js +++ b/Libraries/StyleSheet/PointPropType.js @@ -10,16 +10,9 @@ 'use strict'; -const PropTypes = require('prop-types'); - -const PointPropType = PropTypes.shape({ - x: PropTypes.number, - y: PropTypes.number, -}); - export type PointProp = $ReadOnly<{ x: number, y: number, }>; -module.exports = PointPropType; +module.exports = PointProp; From cccd9dab5041e360f38f0be36897b4452dc27874 Mon Sep 17 00:00:00 2001 From: "Rafael Nunes G. da Silveira" Date: Thu, 27 Sep 2018 01:04:01 -0300 Subject: [PATCH 2/2] Fix wrong PointPropType export --- Libraries/StyleSheet/PointPropType.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/Libraries/StyleSheet/PointPropType.js b/Libraries/StyleSheet/PointPropType.js index fd9e6a61ad40d7..302892edae391a 100644 --- a/Libraries/StyleSheet/PointPropType.js +++ b/Libraries/StyleSheet/PointPropType.js @@ -14,5 +14,3 @@ export type PointProp = $ReadOnly<{ x: number, y: number, }>; - -module.exports = PointProp;