DUP-007
removeEffectFromSubscribers() (lines 822–828) is removeStaleSubscribers() (lines 883–888) with the filter predicate always-true:
// removeStaleSubscribers
for (const dep of prevDeps) {
if (!newDeps.has(dep)) {
findSubscribers(dep)?.delete(eff)
}
}
// removeEffectFromSubscribers
for (const dep of deps) {
findSubscribers(dep)?.delete(eff)
}
The iteration body is identical. removeStaleSubscribers could accept an optional exclude set, and removeEffectFromSubscribers becomes a call with no exclusion. Alternatively, removeEffectFromSubscribers could call removeStaleSubscribers with an empty set.
DUP-007
removeEffectFromSubscribers()(lines 822–828) isremoveStaleSubscribers()(lines 883–888) with the filter predicate always-true:The iteration body is identical.
removeStaleSubscriberscould accept an optionalexcludeset, andremoveEffectFromSubscribersbecomes a call with no exclusion. Alternatively,removeEffectFromSubscriberscould callremoveStaleSubscriberswith an empty set.