Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flow] annotate accumulate, accumulateInto and forEachAccumulated #7053

Merged
merged 1 commit into from
Jun 17, 2016

Commits on Jun 16, 2016

  1. [flow] annotate accumulate and accumulateInto

    Summary:
    Trying to start adding flow types to files in React. I needed to add a script to package.json in order to run flow, flow-bin is already a dependency.
    
    I had to rewrite the implementation a bit. Flow doesn't recognize
    
    ```
    var currentIsArray = Array.isArray(current);
    if (currentIsArray) {
      // not refined
    }
    ```
    
    but the following does work
    
    ```
    if (Array.isArray(current)) {
      // refined
    }
    ```
    
    Test Plan:
    npm run-script flow
    npm run-script test accumulate
    
    Reviewers: @zpao @spicyj
    vjeux committed Jun 16, 2016
    Configuration menu
    Copy the full SHA
    1c71970 View commit details
    Browse the repository at this point in the history