dillon1000/react
Commit
Browse files [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 @spicyjChanged paths4 files
First-parent comparisonpackage.json ModifiedM src/shared/utils/accumulate.js ModifiedM src/shared/utils/accumulateInto.js ModifiedM src/shared/utils/forEachAccumulated.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…