Open niieani opened 7 years ago
(Flow looks for @flow, not ^@flow$, and @flow-runtime satisfies the regex).
nasty!
On a second thought, it might be good to make it configurable: whether we want to:
@flow-runtime
(or another pragma)@flow
pragma is not present, opt-out of it via @flow-runtime disable
(or perhaps to not collide with flow the pragma could be changed?)@flow
is enabled opt-out of it via @flow-runtime disable
or another pragma. Not sure what's the best solution here, but I can see cases where the combination of using @flow-runtime
, while at the same time NOT using @flow
also might make sense.
In essence, we'd need to support all permutations.
This is a:
Which concerns:
What is the current behaviour?
Currently, a file that contains type annotations, but no
@flow
pragma, will still get theflow-runtime
annotations. This is a problem, especially since you cannot write@flow-runtime ignore
, without enabling flow itself at the same time 🤓(Flow looks for
@flow
, not^@flow$
, and@flow-runtime
satisfies the regex).What is the expected behaviour?
The babel plugin should not annotate files without the
@flow
pragma.Which package versions are you using?
0.10.0