I'm new to working with flow. I'm trying to get as close to 100% flow coverage as possible on a project, and one thing I can't figure out is how to handle is JSON.parse.
type ExampleType = {
thingOne: boolean,
thingTwo: boolean,
};
const exampleVariable: ExampleType = JSON.parse(
'{thingOne: true, thingTwo: false}'
);
So I have a type, and I receive a string from another source, and I parse it and expect it to be of that type.
The whole JSON.parse(...) section is marked as "Not covered by flow".
Is there a way to get a file to 100% flow coverage if JSON.parse is used in that file? How? What exactly is flow saying when it says that line isn't covered?