Revert "Remove flow"

This reverts commit 2827ff6b01.
This commit is contained in:
Amjad Masad
2016-03-03 14:49:20 -08:00
parent b88182cacf
commit 3667527d04
75 changed files with 542 additions and 278 deletions

View File

@@ -1,4 +1,5 @@
import bindifyDecorators from "babel-helper-bindify-decorators";
import type { NodePath } from "babel-traverse";
import * as t from "babel-types";
export default function (classPath) {
@@ -14,7 +15,7 @@ export default function (classPath) {
path.replaceWith(uid);
}
function memoiseDecorators(paths) {
function memoiseDecorators(paths: Array<NodePath>) {
if (!Array.isArray(paths) || !paths.length) return;
// ensure correct evaluation order of decorators
@@ -31,7 +32,7 @@ export default function (classPath) {
maybeMemoise(classPath.get("superClass"));
memoiseDecorators(classPath.get("decorators"), true);
let methods = classPath.get("body.body");
let methods: Array<NodePath> = classPath.get("body.body");
for (let methodPath of methods) {
if (methodPath.is("computed")) {
maybeMemoise(methodPath.get("key"));