Daniel Lo Nigro 0076204f80 Fix Flow.
Removed `@flow` annotation from files that don't actually pass Flow check at the moment. These will be added back file by file once the files are properly converted to use Flow.

Closes #3064
2015-11-15 21:30:22 -08:00

13 lines
308 B
JavaScript

import * as t from "babel-types";
export default function (node): number {
let params: Array<Object> = node.params;
for (let i = 0; i < params.length; i++) {
let param = params[i];
if (t.isAssignmentPattern(param) || t.isRestElement(param)) {
return i;
}
}
return params.length;
}