(this: SignalNode<T>, ...value: [T])
| 366 | } |
| 367 | |
| 368 | function signalOper<T>(this: SignalNode<T>, ...value: [T]): T | void { |
| 369 | if (value.length) { |
| 370 | if (this.pendingValue !== (this.pendingValue = value[0])) { |
| 371 | this.flags = ReactiveFlags.Mutable | ReactiveFlags.Dirty; |
| 372 | const subs = this.subs; |
| 373 | if (subs !== undefined) { |
| 374 | propagate(subs, !!runDepth); |
| 375 | if (!batchDepth) { |
| 376 | flush(); |
| 377 | } |
| 378 | } |
| 379 | } |
| 380 | } else { |
| 381 | if (this.flags & ReactiveFlags.Dirty) { |
| 382 | if (updateSignal(this)) { |
| 383 | const subs = this.subs; |
| 384 | if (subs !== undefined) { |
| 385 | shallowPropagate(subs); |
| 386 | } |
| 387 | } |
| 388 | } |
| 389 | const sub = activeSub; |
| 390 | if (sub !== undefined) { |
| 391 | link(this, sub, cycle); |
| 392 | } |
| 393 | return this.currentValue; |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | function runCleanup(e: EffectNode): void { |
| 398 | const cleanup = e.cleanup!; |
nothing calls this directly
no test coverage detected
searching dependent graphs…