Remove flow
This commit is contained in:
@@ -22,7 +22,7 @@ let buildCutOff = template(`
|
||||
`);
|
||||
|
||||
function hasDefaults(node) {
|
||||
for (let param of (node.params: Array<Object>)) {
|
||||
for (let param of node.params) {
|
||||
if (!t.isIdentifier(param)) return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as t from "babel-types";
|
||||
|
||||
export let visitor = {
|
||||
Function(path) {
|
||||
let params: Array = path.get("params");
|
||||
let params = path.get("params");
|
||||
|
||||
// If there's a rest param, no need to loop through it. Also, we need to
|
||||
// hoist one more level to get `declar` at the right spot.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { NodePath } from "babel-traverse";
|
||||
import { visitors } from "babel-traverse";
|
||||
|
||||
import * as destructuring from "./destructuring";
|
||||
@@ -10,7 +9,7 @@ export default function () {
|
||||
visitor: visitors.merge([{
|
||||
ArrowFunctionExpression(path) {
|
||||
// default/rest visitors require access to `arguments`
|
||||
let params: Array<NodePath> = path.get("params");
|
||||
let params = path.get("params");
|
||||
for (let param of params) {
|
||||
if (param.isRestElement() || param.isAssignmentPattern()) {
|
||||
path.arrowFunctionToShadowed();
|
||||
|
||||
@@ -198,7 +198,7 @@ export let visitor = {
|
||||
|
||||
// There are only "shorthand" references
|
||||
if (!state.deopted && !state.references.length) {
|
||||
for (let {path, cause} of (state.candidates: Array)) {
|
||||
for (let {path, cause} of state.candidates) {
|
||||
switch (cause) {
|
||||
case "indexGetter":
|
||||
optimiseIndexGetter(path, argsId, state.offset);
|
||||
|
||||
Reference in New Issue
Block a user