strip flow directives in flow transformer - fixes #1934
This commit is contained in:
parent
337c51df5c
commit
a262e99abd
@ -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();
|
||||
},
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
/*@flow*/
|
||||
|
||||
/* @flow */
|
||||
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
foo();
|
||||
@ -0,0 +1 @@
|
||||
foo();
|
||||
Loading…
x
Reference in New Issue
Block a user