react-resizable
react-resizable copied to clipboard
Flow type errors: handleSize, minConstraints, maxConstraints
Thanks for opening an issue!
Please select the type of issue you're reporting. For questions.
- [x] Bug
- [ ] Feature Request
- [ ] Question
Problem Report
See reproduction below.
System Info
Node Version: 6.10.2 Browser: n/a OS: OS X
Reproduction
When trying to use in a flow type enabled project I experience these errors:
node_modules/react-resizable/build/ResizableBox.js.flow:55
v---------
55: <Resizable
56: handleSize={handleSize}
57: width={this.state.width}
...:
67: >
^ props of React element `Resizable`
56: handleSize={handleSize}
^^^^^^^^^^ tuple type. This type is incompatible with
84: handleSize: [20, 20],
^^^^^^^^ array literal. See: node_modules/react-resizable/build/Resizable.js.flow:84
node_modules/react-resizable/build/ResizableBox.js.flow:55
v---------
55: <Resizable
56: handleSize={handleSize}
57: width={this.state.width}
...:
67: >
^ props of React element `Resizable`
63: minConstraints={minConstraints}
^^^^^^^^^^^^^^ tuple type. This type is incompatible with
87: minConstraints: [20, 20],
^^^^^^^^ array literal. See: node_modules/react-resizable/build/Resizable.js.flow:87
node_modules/react-resizable/build/ResizableBox.js.flow:55
v---------
55: <Resizable
56: handleSize={handleSize}
57: width={this.state.width}
...:
67: >
^ props of React element `Resizable`
64: maxConstraints={maxConstraints}
^^^^^^^^^^^^^^ tuple type. This type is incompatible with
88: maxConstraints: [Infinity, Infinity]
^^^^^^^^^^^^^^^^^^^^ array literal. See: node_modules/react-resizable/build/Resizable.js.flow:88
Are you on the latest version?
On Jun 2, 2017 10:09 AM, "Ilya Boyandin" [email protected] wrote:
Thanks for opening an issue!
Please select the type of issue you're reporting. For questions.
- [ x] Bug
- Feature Request
- Question
Problem Report
Please describe the problem here.
System Info
Node Version: 6.10.2 Browser: n/a OS: OS X Reproduction
When trying to use in a flow type enabled project I experience these errors:
node_modules/react-resizable/build/ResizableBox.js.flow:55 v--------- 55: <Resizable 56: handleSize={handleSize} 57: width={this.state.width} ...: 67: > ^ props of React element
Resizable
56: handleSize={handleSize} ^^^^^^^^^^ tuple type. This type is incompatible with 84: handleSize: [20, 20], ^^^^^^^^ array literal. See: node_modules/react-resizable/build/Resizable.js.flow:84node_modules/react-resizable/build/ResizableBox.js.flow:55 v--------- 55: <Resizable 56: handleSize={handleSize} 57: width={this.state.width} ...: 67: > ^ props of React element
Resizable
63: minConstraints={minConstraints} ^^^^^^^^^^^^^^ tuple type. This type is incompatible with 87: minConstraints: [20, 20], ^^^^^^^^ array literal. See: node_modules/react-resizable/build/Resizable.js.flow:87node_modules/react-resizable/build/ResizableBox.js.flow:55 v--------- 55: <Resizable 56: handleSize={handleSize} 57: width={this.state.width} ...: 67: > ^ props of React element
Resizable
64: maxConstraints={maxConstraints} ^^^^^^^^^^^^^^ tuple type. This type is incompatible with 88: maxConstraints: [Infinity, Infinity] ^^^^^^^^^^^^^^^^^^^^ array literal. See: node_modules/react-resizable/build/Resizable.js.flow:88— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/STRML/react-resizable/issues/67, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJFP68Ia5a66Es8dm9Ak_TOQ3UobZ_Nks5sACWZgaJpZM4NuaQC .
Same issue here. Would be nice if this could be fixed.
I'm not able to reproduce this. Could one of you, who has the error, create a small reproduction repo w/ flowconfig?
@STRML Please see: https://github.com/setusoft/react-resizable-flow-issue
@STRML Does the created repository help?
Can confirm, having the same problem. Have anyone found a way to fix it?
I had this error too and just wanted to mute it.
To mute it, you can adjust your .flowconfig:
[ignore]
.*/node_modules/react-resizable/.*
and then you need a custom libdef with the content:
declare module 'react-resizable' {
declare module.exports: any;
}
Just a temporary workaround for those affected.