flow suggest broken

Created on 11 Mar 2018  路  3Comments  路  Source: facebook/flow

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.

bug

Most helpful comment

Colors? :slightly_smiling_face: Syntactically correct diff will be sufficient!

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings