Skip to content

Commit

Permalink
Split PointPropType (#21355)
Browse files Browse the repository at this point in the history
Summary:
This PR split PointPropType.js into PointPropType.js with Flow definition and  Libraries/DeprecatedPointPropType.js remaining with PropTypes definition.

Related to #21342
Pull Request resolved: #21355

Differential Revision: D10081399

Pulled By: TheSavior

fbshipit-source-id: 2283ff3fbda6b0f525742336f92fd6279250b874
  • Loading branch information
peaonunes authored and facebook-github-bot committed Sep 27, 2018
1 parent 1b90908 commit f3c8027
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
20 changes: 20 additions & 0 deletions Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js
Original file line number Diff line number Diff line change
@@ -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;
9 changes: 0 additions & 9 deletions Libraries/StyleSheet/PointPropType.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,7 @@

'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;

0 comments on commit f3c8027

Please sign in to comment.