I wanted to check if there is a property in an array of objects that has a null value , if there is then return true.
Currently my issue is
This condition will always return 'false' since the types '{ type: any; startDate: string; endDate: string; annualRent: any; }' and 'string' have no overlap.ts(2367)
#current code for checking empty property
const hasEmptyRentSchedProperty = Object.values((this.proposedRentSchedule)).some((v => v === null || v === ""))
#object = this.proposedRentSchedule
[
{
"type": 0,
"startDate": "2022-1-4",
"endDate": "2022-1-19",
"annualRent": "232"
},
{
"type": 0,
"startDate": "2022-1-20",
"endDate": "2022-1-20",
"annualRent": null
}
]