Hello everyone, I'm a junior developer and could use some assistance
if (query.deliveryType && query.deliveryType != DeliveryTypeEnum.EITHER) {
search.push({
terms: {
"deliveryType.keyword": [query.deliveryType, DeliveryTypeEnum.EITHER],
},
});
}
The delivery type is a string array
I'm encountering an error: "This condition will always return 'true' since the types 'string[]' and 'DeliveryTypeEnum' have no overlap." in TypeScript (2367)
The error originates from this line of code
query.deliveryType && query.deliveryType != DeliveryTypeEnum.EITHER