1- export interface IEffectScope extends Subscriber {
2- nextNotify : IEffectScope | undefined ;
1+ export interface IEffect extends Dependency , Subscriber {
2+ nextNotify : IEffect | undefined ;
33 notify ( ) : void ;
44}
55
6- export interface IEffect extends Dependency , IEffectScope { }
7-
86export interface IComputed extends Dependency , Subscriber {
97 update ( ) : void ;
108}
@@ -24,7 +22,7 @@ export interface Subscriber {
2422
2523export interface Link {
2624 dep : Dependency | IComputed | IEffect ;
27- sub : IComputed | IEffect | IEffectScope ;
25+ sub : IComputed | IEffect ;
2826 trackId : number ;
2927 // Also used as prev update
3028 prevSub : Link | undefined ;
@@ -43,13 +41,13 @@ export const enum DirtyLevels {
4341
4442export namespace System {
4543 export let activeSub : IComputed | IEffect | undefined = undefined ;
46- export let activeEffectScope : IEffectScope | undefined = undefined ;
44+ export let activeEffectScope : IEffect | undefined = undefined ;
4745 export let activeTrackId = 0 ;
4846 export let activeEffectScopeTrackId = 0 ;
4947 export let batchDepth = 0 ;
5048 export let lastTrackId = 0 ;
51- export let queuedEffects : IEffectScope | undefined = undefined ;
52- export let queuedEffectsTail : IEffectScope | undefined = undefined ;
49+ export let queuedEffects : IEffect | undefined = undefined ;
50+ export let queuedEffectsTail : IEffect | undefined = undefined ;
5351}
5452
5553export function startBatch ( ) {
@@ -433,7 +431,7 @@ export namespace Subscriber {
433431 sub . trackId = - sub . trackId ;
434432 }
435433
436- export function startTrackEffects ( sub : IEffectScope ) {
434+ export function startTrackEffects ( sub : IEffect ) {
437435 const newVersion = system . lastTrackId + 1 ;
438436 const prevSub = system . activeEffectScope ;
439437
@@ -448,7 +446,7 @@ export namespace Subscriber {
448446 return prevSub ;
449447 }
450448
451- export function endTrackEffects ( sub : IEffectScope , prevSub : IEffectScope | undefined ) {
449+ export function endTrackEffects ( sub : IEffect , prevSub : IEffect | undefined ) {
452450 if ( prevSub !== undefined ) {
453451 system . activeEffectScope = prevSub ;
454452 system . activeEffectScopeTrackId = prevSub . trackId ;
0 commit comments