Skip to content

Flow error with flow 0.46 and react-resizable 1.7.1 #63

@frankychung

Description

@frankychung

Thanks for opening an issue!

Please select the type of issue you're reporting. For questions.

  • Bug
  • Feature Request
  • Question

Problem Report

I get an error with flow with flow 0.46 (I also checked 0.45 and there are the same errors) and react-resizable 1.7.1. If you'd like I could make a PR to update the flow types in these files. Thanks!

System Info

Node Version: 7.7.4
Browser:
OS: macOS

Reproduction

Here is my flow output:

node_modules/react-resizable/build/ResizableBox.js.flow:55
           v---------
 55:       <Resizable
 56:         handleSize={handleSize}
 57:         width={this.state.width}
...:
 67:         >
             ^ React element `Resizable`
 81:   props: Props;
              ^^^^^ property `children`. Property not found in. See: node_modules/react-resizable/build/Resizable.js.flow:81
           v---------
 55:       <Resizable
 56:         handleSize={handleSize}
 57:         width={this.state.width}
...:
 67:         >
             ^ props of React element `Resizable`

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions