Flow Bro, watch this!

Maybe you have read my introduction to Flow Bro already, otherwise here is the TL;DR: Flow Bro is a CLI helper for developers using the flow type system in Javascript. It allows to query for the most untyped files and it gets you a coverage for the project. Now let me introduce the newest feature: Watch mode for Flow!

Flow watch

As long as I have been using flow I always wanted to have a watch mode so I can use it side by side with my unit tests and see if I missed some type annotations. I could only find issues with long discussions about how and when to introduce it and SO questions about the topic. I thought: “Hey, let’s just extend my flow-bro” and30 lines of code later we are here:

flow-bro watch

Thats’ it. Let me tell you, my development workflow got better by a lot. It really helps seeing up to date flow status reports and jest in watch mode side by side.

The first run takes a while, but after that: INSTANT PRODUCTIVITY


You may think that this will put your computer under a heavy strain but it won’t. Flow starts a server under the hood for the first flow status and reuses this information for every other status command as well. And as you kill the watch task flow-bro will even stop this server for you. How nice of him.

What’s next?

Flow-Bro in its current form is quite useful to me, it gives me the most untyped files to work on next, it tells me the current coverage and also watches over me as I type. But I think extending it even further may make at an even better companion. This is my next step I would like to take:

I would like to introduce a command which transforms React PropTypes to Flow types but I haven’t had time to dive into this, yet. I will keep you posted. Until then:

Want to hear more from me? Feel free to subscribe to my newsletter; I send out news roughly once a month.