dillon1000/react

Commit

[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
Browse files
Changed paths4 files
First-parent comparison
M package.json ModifiedM src/shared/utils/accumulate.js ModifiedM src/shared/utils/accumulateInto.js ModifiedM src/shared/utils/forEachAccumulated.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…