1- export interface IEffect extends Dependency , Subscriber {
1+ export interface IEffect extends Subscriber {
22 nextNotify : IEffect | undefined ;
33 notify ( ) : void ;
44}
@@ -21,7 +21,7 @@ export interface Subscriber {
2121}
2222
2323export interface Link {
24- dep : Dependency | IComputed | IEffect ;
24+ dep : Dependency | IComputed | ( Dependency & IEffect ) ;
2525 sub : Subscriber | IComputed | IEffect ;
2626 trackId : number ;
2727 // Also used as prev update
@@ -282,7 +282,7 @@ export namespace Subscriber {
282282
283283 const system = System ;
284284
285- export function resolveMaybeDirty ( sub : IComputed | IEffect , depth = 0 ) : void {
285+ export function resolveMaybeDirty ( sub : IComputed | ( IEffect & Dependency ) , depth = 0 ) : void {
286286 let link = sub . deps ;
287287
288288 while ( link !== undefined ) {
@@ -313,7 +313,7 @@ export namespace Subscriber {
313313 }
314314 }
315315
316- export function resolveMaybeDirtyNonRecursive ( sub : IComputed | IEffect ) : void {
316+ export function resolveMaybeDirtyNonRecursive ( sub : IComputed | ( IEffect & Dependency ) ) : void {
317317 let link = sub . deps ;
318318 let remaining = 0 ;
319319
@@ -340,7 +340,7 @@ export namespace Subscriber {
340340 const prevLink = subSubs . prevSub ! ;
341341 ( sub as IComputed ) . update ( ) ;
342342 subSubs . prevSub = undefined ;
343- sub = prevLink . sub as IComputed | IEffect ;
343+ sub = prevLink . sub as IComputed | ( IEffect & Dependency ) ;
344344 link = prevLink . nextDep ;
345345 remaining -- ;
346346 continue ;
@@ -363,7 +363,7 @@ export namespace Subscriber {
363363 const subSubs = sub . subs ! ;
364364 const prevLink = subSubs . prevSub ! ;
365365 subSubs . prevSub = undefined ;
366- sub = prevLink . sub as IComputed | IEffect ;
366+ sub = prevLink . sub as IComputed | ( IEffect & Dependency ) ;
367367 link = prevLink . nextDep ;
368368 remaining -- ;
369369 continue ;
@@ -375,7 +375,7 @@ export namespace Subscriber {
375375 const subSubs = sub . subs ! ;
376376 const prevLink = subSubs . prevSub ! ;
377377 subSubs . prevSub = undefined ;
378- sub = prevLink . sub as IComputed | IEffect ;
378+ sub = prevLink . sub as IComputed | ( IEffect & Dependency ) ;
379379 link = prevLink . nextDep ;
380380 remaining -- ;
381381 continue ;
0 commit comments