flow-ide sometimes seems to indicate the long line of code even though Flow has told it where the error is. For example, if I have a code snippet like this:
/* @flow */
type Type = {p1: boolean};
const f = (obj: Type) => obj; // error gets shown here
f({p1: true});
f({p2: true}); // invalid code here
Then Flow will give me an easy to comprehend error message like this:
src/index.js:5
5: f({p2: true}); // invalid code here
^^^^^^^^^^^^^ function call
3: const f = (obj: Type) => obj; // error gets shown here
^^^^ property `p1`. Property not found in
5: f({p2: true}); // invalid code here
^^^^^^^^^^ object literal
whereas flow-ide will indicate line 3 only, and display the error message property 'p1'. Property not found in.
This should work since even the JSON output from Flow seems to provide the correct information here:
flow-ide sometimes seems to indicate the long line of code even though Flow has told it where the error is. For example, if I have a code snippet like this:
Then Flow will give me an easy to comprehend error message like this:
whereas flow-ide will indicate line 3 only, and display the error message
property 'p1'. Property not found in
.This should work since even the JSON output from Flow seems to provide the correct information here: