tc39 / proposal-signals

A proposal to add signals to JavaScript.
MIT License
2.87k stars 54 forks source link

"Watcher" state machine is undocumented #204

Closed prophile closed 5 days ago

prophile commented 2 weeks ago

The specification spells out in "Signal.subtle.Watcher internal slots":

state: May be ~watching~, ~pending~ or ~waiting~

The semantics of these are never spelled out, nor are most of the transitions. In "Constructor: new Signal.subtle.Watcher(callback)" we have:

  1. state is set to ~waiting~

And we have transitions from ~pending~ to ~watching~ spelled out in phases 4 and 5 of "Method: Signal.State.prototype.set(newValue)". But there's no reference to any other state changes.