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,6 +1,7 @@
import type NodePath from "../index";
import * as t from "babel-types";
export default function (node) {
export default function (node: Object) {
if (!this.isReferenced()) return;
// check if a binding exists of this value and if so then return a union type of all
@@ -75,7 +76,7 @@ function getTypeAnnotationBindingConstantViolations(path, name) {
constantViolations = constantViolations.concat(functionConstantViolations);
// push on inferred types of violated paths
for (let violation of constantViolations) {
for (let violation of (constantViolations: Array<NodePath>)) {
types.push(violation.getTypeAnnotation());
}
}