(sources: (Solid.Computation | Solid.Signal)[])
| 119 | // patches source objects to track their value updates |
| 120 | // will unsubscribe from previous sources on each call |
| 121 | const observeSources = (sources: (Solid.Computation | Solid.Signal)[]): void => { |
| 122 | updateListeners.forEach(unsub => unsub()) |
| 123 | updateListeners = [] |
| 124 | sources.forEach(source => { |
| 125 | observeValueUpdate( |
| 126 | source, |
| 127 | value => signalUpdates.push({...getNodeState(source), value}), |
| 128 | SYMBOL, |
| 129 | ) |
| 130 | updateListeners.push(() => removeValueUpdateObserver(source, SYMBOL)) |
| 131 | }) |
| 132 | } |
| 133 | |
| 134 | // this is for logging the initial state after the first callback execution |
| 135 | // the "value" property is monkey patched for one function execution |
no test coverage detected
searching dependent graphs…