(c: ComputedNode)
| 238 | } |
| 239 | |
| 240 | function updateComputed(c: ComputedNode): boolean { |
| 241 | if (c.flags & HasChildEffect) { |
| 242 | let link = c.depsTail; |
| 243 | while (link !== undefined) { |
| 244 | const prev = link.prevDep; |
| 245 | const dep = link.dep; |
| 246 | if (!('getter' in dep) && !('currentValue' in dep)) { |
| 247 | unlink(link, c); |
| 248 | } |
| 249 | link = prev; |
| 250 | } |
| 251 | } |
| 252 | c.depsTail = undefined; |
| 253 | c.flags = ReactiveFlags.Mutable | ReactiveFlags.RecursedCheck; |
| 254 | const prevSub = setActiveSub(c); |
| 255 | try { |
| 256 | ++cycle; |
| 257 | const oldValue = c.value; |
| 258 | return oldValue !== (c.value = c.getter(oldValue)); |
| 259 | } finally { |
| 260 | activeSub = prevSub; |
| 261 | c.flags &= ~ReactiveFlags.RecursedCheck; |
| 262 | purgeDeps(c); |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | function updateSignal(s: SignalNode): boolean { |
| 267 | s.flags = ReactiveFlags.Mutable; |
no test coverage detected
searching dependent graphs…