(this: ComputedNode<T>)
| 331 | } |
| 332 | |
| 333 | function computedOper<T>(this: ComputedNode<T>): T { |
| 334 | const flags = this.flags; |
| 335 | if ( |
| 336 | flags & ReactiveFlags.Dirty |
| 337 | || ( |
| 338 | flags & ReactiveFlags.Pending |
| 339 | && ( |
| 340 | checkDirty(this.deps!, this) |
| 341 | || (this.flags = flags & ~ReactiveFlags.Pending, false) |
| 342 | ) |
| 343 | ) |
| 344 | ) { |
| 345 | if (updateComputed(this)) { |
| 346 | const subs = this.subs; |
| 347 | if (subs !== undefined) { |
| 348 | shallowPropagate(subs); |
| 349 | } |
| 350 | } |
| 351 | } else if (!flags) { |
| 352 | this.flags = ReactiveFlags.Mutable | ReactiveFlags.RecursedCheck; |
| 353 | const prevSub = setActiveSub(this); |
| 354 | try { |
| 355 | this.value = this.getter(); |
| 356 | } finally { |
| 357 | activeSub = prevSub; |
| 358 | this.flags &= ~ReactiveFlags.RecursedCheck; |
| 359 | } |
| 360 | } |
| 361 | const sub = activeSub; |
| 362 | if (sub !== undefined) { |
| 363 | link(this, sub, cycle); |
| 364 | } |
| 365 | return this.value!; |
| 366 | } |
| 367 | |
| 368 | function signalOper<T>(this: SignalNode<T>, ...value: [T]): T | void { |
| 369 | if (value.length) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…