From 235d1fd8f90a2ba15f5825571218e125a7b33464 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Tue, 27 Sep 2016 14:42:29 -0500 Subject: [PATCH] Fix minor flow errors --- CHANGELOG.md | 1 + lib/Resizable.jsx | 2 +- lib/ResizableBox.jsx | 2 +- lib/cloneElement.js | 2 +- package.json | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 606f8f34..6b2677e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### 1.4.3 (Sep 27, 2016) - Bugfix: Don't pass `onResize` in ``. +- Bugfix: Fix new Flow errors (type parameters no longer optional). ### 1.4.2 (July 1, 2016) diff --git a/lib/Resizable.jsx b/lib/Resizable.jsx index 66b39ce6..133f1048 100644 --- a/lib/Resizable.jsx +++ b/lib/Resizable.jsx @@ -163,7 +163,7 @@ export default class Resizable extends React.Component { }; } - render(): React.Element { + render(): React.Element { // eslint-disable-next-line no-unused-vars const {children, draggableOpts, width, height, handleSize, lockAspectRatio, minConstraints, maxConstraints, onResize, diff --git a/lib/ResizableBox.jsx b/lib/ResizableBox.jsx index 8daa7e58..ac4c346d 100644 --- a/lib/ResizableBox.jsx +++ b/lib/ResizableBox.jsx @@ -31,7 +31,7 @@ export default class ResizableBox extends React.Component { }; onResize: (event: Event, data: ResizeData) => void; - render(): React.Element { + render(): React.Element { // Basic wrapper around a Resizable instance. // If you use Resizable directly, you are responsible for updating the child component // with a new width and height. diff --git a/lib/cloneElement.js b/lib/cloneElement.js index df67d208..b3ae00c7 100644 --- a/lib/cloneElement.js +++ b/lib/cloneElement.js @@ -2,7 +2,7 @@ import React from 'react'; // React.addons.cloneWithProps look-alike that merges style & className. -module.exports = function cloneElement(element: React.Element, props: Object): React.Element { +module.exports = function cloneElement(element: React.Element, props: Object): React.Element { if (props.style && element.props.style) { props.style = {...element.props.style, ...props.style}; } diff --git a/package.json b/package.json index 20b0170f..f74be7cf 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "css-loader": "^0.23.1", "eslint": "^1.10.3", "eslint-plugin-react": "^3.16.1", - "flow-bin": "^0.25.0", + "flow-bin": "^0.32.0", "lodash": "^4.3.0", "pre-commit": "^1.1.2", "react": "^15.0.0",