strip flow directives in flow transformer - fixes #1934

This commit is contained in:
Sebastian McKenzie 2015-07-07 10:52:43 +01:00
parent 337c51df5c
commit a262e99abd
3 changed files with 17 additions and 0 deletions

View File

@ -5,6 +5,13 @@ export var metadata = {
};
export var visitor = {
Program(node, parent, scope, file) {
for (var comment of (file.ast.comments: Array)) {
if (comment.value.indexOf("@flow") >= 0) {
comment._displayed = true;
}
}
},
Flow() {
this.dangerouslyRemove();
},

View File

@ -0,0 +1,9 @@
/*@flow*/
/* @flow */
/**
* @flow
*/
foo();

View File

@ -0,0 +1 @@
foo();