You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be better to be very explicit here rather than relying on implicit reference to the ES Set, specifically: that sources and sinks aren't semantically sets but arrays/lists (intrinsically ordered), and that we explicitly check their contents and don't re-add anything. There's some ambiguity as it's currently worded:
In the Typescript definitions, there's a comment:
// Returns ordered list of all signals which this one referenced// during the last time it was evaluated.// For a Watcher, lists the set of signals which it is watching.
But it doesn't specify what order, just that it is ordered. Specifically this is order of first reference I think. For a Watcher the order isn't specified at all here but probably should be?
In the "Signal.Computed Internal Slots" section also:
sources: An ordered set of Signals which this Signal depends on. sinks: An ordered set of Signals which depend on this Signal.
We should be clear about what this order is. This is more subtle because items can be individually removed, e.g. by Signal.subtle.Watcher.prototype.unwatch(...signals):
Remove this Watcher from that Signal's sink set.
If the same watcher calls watch on the same Signal.Computed it will be readded as a sink, but that leaves the order of sinks permuted from what it originally was.
The text was updated successfully, but these errors were encountered:
I think it would be better to be very explicit here rather than relying on implicit reference to the ES
Set
, specifically: thatsources
andsinks
aren't semantically sets but arrays/lists (intrinsically ordered), and that we explicitly check their contents and don't re-add anything. There's some ambiguity as it's currently worded:In the Typescript definitions, there's a comment:
But it doesn't specify what order, just that it is ordered. Specifically this is order of first reference I think. For a
Watcher
the order isn't specified at all here but probably should be?In the "Signal.Computed Internal Slots" section also:
We should be clear about what this order is. This is more subtle because items can be individually removed, e.g. by
Signal.subtle.Watcher.prototype.unwatch(...signals)
:If the same watcher calls
watch
on the sameSignal.Computed
it will be readded as a sink, but that leaves the order ofsinks
permuted from what it originally was.The text was updated successfully, but these errors were encountered: