Remove flow
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
/* eslint max-len: 0 */
|
||||
|
||||
import type { NodePath } from "babel-traverse";
|
||||
import { visitors } from "babel-traverse";
|
||||
import ReplaceSupers from "babel-helper-replace-supers";
|
||||
import optimiseCall from "babel-helper-optimise-call-expression";
|
||||
@@ -61,7 +60,7 @@ let findThisesVisitor = visitors.merge([noMethodVisitor, {
|
||||
}]);
|
||||
|
||||
export default class ClassTransformer {
|
||||
constructor(path: NodePath, file) {
|
||||
constructor(path, file) {
|
||||
this.parent = path.parent;
|
||||
this.scope = path.scope;
|
||||
this.node = path.node;
|
||||
@@ -149,7 +148,7 @@ export default class ClassTransformer {
|
||||
return func;
|
||||
}
|
||||
|
||||
pushToMap(node, enumerable, kind = "value", scope?) {
|
||||
pushToMap(node, enumerable, kind = "value", scope) {
|
||||
let mutatorMap;
|
||||
if (node.static) {
|
||||
this.hasStaticDescriptors = true;
|
||||
@@ -176,7 +175,7 @@ export default class ClassTransformer {
|
||||
constructorMeMaybe() {
|
||||
let hasConstructor = false;
|
||||
let paths = this.path.get("body.body");
|
||||
for (let path of (paths: Array)) {
|
||||
for (let path of paths) {
|
||||
hasConstructor = path.equals("kind", "constructor");
|
||||
if (hasConstructor) break;
|
||||
}
|
||||
@@ -217,7 +216,7 @@ export default class ClassTransformer {
|
||||
}
|
||||
|
||||
pushBody() {
|
||||
let classBodyPaths: Array<Object> = this.path.get("body.body");
|
||||
let classBodyPaths = this.path.get("body.body");
|
||||
|
||||
for (let path of classBodyPaths) {
|
||||
let node = path.node;
|
||||
@@ -451,7 +450,7 @@ export default class ClassTransformer {
|
||||
* Push a method to its respective mutatorMap.
|
||||
*/
|
||||
|
||||
pushMethod(node: { type: "ClassMethod" }, path?: NodePath) {
|
||||
pushMethod(node, path) {
|
||||
let scope = path ? path.scope : this.scope;
|
||||
|
||||
if (node.kind === "method") {
|
||||
@@ -469,7 +468,7 @@ export default class ClassTransformer {
|
||||
* Replace the constructor body of our class.
|
||||
*/
|
||||
|
||||
pushConstructor(replaceSupers, method: { type: "ClassMethod" }, path: NodePath) {
|
||||
pushConstructor(replaceSupers, method, path) {
|
||||
this.bareSupers = replaceSupers.bareSupers;
|
||||
this.superReturns = replaceSupers.returns;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user