File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export class Computed<T = any> implements IComputed {
4040 if ( activeTrackId !== 0 ) {
4141 const subsTail = this . subsTail ;
4242 if ( subsTail === undefined || subsTail . trackId !== activeTrackId ) {
43- Dependency . linkSubscriber ( this , System . activeSub ! ) ;
43+ Dependency . link ( this , System . activeSub ! ) ;
4444 }
4545 }
4646 return this . cachedValue ! ;
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ export class Effect<T = any> implements IEffect {
2626 ) {
2727 const activeTrackId = System . activeTrackId ;
2828 if ( activeTrackId !== 0 ) {
29- Dependency . linkSubscriber ( this , System . activeSub ! ) ;
29+ Dependency . link ( this , System . activeSub ! ) ;
3030 return ;
3131 }
3232 if ( activeEffectScope !== undefined ) {
3333 const subsTail = this . subsTail ;
3434 if ( subsTail === undefined || subsTail . trackId !== activeEffectScope . trackId ) {
35- Dependency . linkSubscriber ( this , activeEffectScope ) ;
35+ Dependency . link ( this , activeEffectScope ) ;
3636 }
3737 }
3838 }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export class Signal<T = any> implements Dependency {
2525 if ( activeTrackId !== 0 ) {
2626 const subsTail = this . subsTail ;
2727 if ( subsTail === undefined || subsTail . trackId !== activeTrackId ) {
28- Dependency . linkSubscriber ( this , System . activeSub ! ) ;
28+ Dependency . link ( this , System . activeSub ! ) ;
2929 }
3030 }
3131 return this . currentValue ! ;
Original file line number Diff line number Diff line change @@ -128,7 +128,14 @@ export namespace Dependency {
128128
129129 const system = System ;
130130
131+ /**
132+ * @deprecated Use `startTrack` instead.
133+ */
131134 export function linkSubscriber ( dep : Dependency , sub : Subscriber ) {
135+ return link ( dep , sub ) ;
136+ }
137+
138+ export function link ( dep : Dependency , sub : Subscriber ) {
132139 const depsTail = sub . depsTail ;
133140 const old = depsTail !== undefined
134141 ? depsTail . nextDep
You can’t perform that action at this time.
0 commit comments