Open
Description
I'm trying to do a type casting for my custom type inside array functions
return ((Object.values(terms).sort((t1: mixed, t2: mixed) => {
// Cast t1 and t2 from mixed to Term
term1 = ((t1: any): Term)
term2 = ((t2: any): Term)
// Sort by date
return new Date(term1.details.startDate) - new Date(term2.details.startDate)
}): any): Array<Term>)
However, in VSCode, it shows me blue error saying "[flow coverage] uncovered code", and I believe the way of me doing this casting is correct based on this link
Is there any way I can get rid of this error? Or is my implementation not correct? Thanks
Activity