Quiero crear esta función:
const hasObject = (myObjectSet: Set<MyObject>) => { if (myObjectSet.size === 0) { return false } // test if there is an object with id 4 } El equivalente de some para una matriz.
EDITAR
Lo hice así al final:
const hasObject = (myObjectSet: Set<MyObject>) => { if (myObjectSet.size === 0) { return false } let result = false myObjectSet.forEach((myObject) => { if(myObject.id === 4) { result = true } }) return result }