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
13 lines
308 B
JavaScript
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;
|
|
}
|