Go to an empty directory:
npm i flow-bin
echo 'var f = (a, b) => a + b;' > a.js
./node_modules/.bin/flow init
./node_modules/.bin/flow suggest a.js
Gives:
--- old
+++ new
@@ -1 +1 @@
-var f = (a, b) => a + b;
+var fany = (aany, bany) => aany + banyany(a: any, b: any) => any;
Tried it on the most recent versions, and it was working in 0.65.0 and earlier, but broken in 0.66.0 and newer.
Any plans to fix it?
It would be good to have suggestion in colors
Colors? :slightly_smiling_face: Syntactically correct diff will be sufficient!
Oh, this has been fixed since a few versions back. Closing. Adding color support is not on the roadmap unfortunately-- there's other improvements to get done before (like preserving comments on suggested code). For colors there's other tools (highlight.js-cli, cli-highlight) that can probably be appended to the command to get job done.
Most helpful comment
Colors? :slightly_smiling_face: Syntactically correct diff will be sufficient!