Skip to content

Commit a5c31cb

Browse files
committed
refactor(system): rename linkSubscriber to link
1 parent e577a12 commit a5c31cb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/computed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class Computed<T = any> implements IComputed {
3838
}
3939
const activeTrackId = System.activeTrackId;
4040
if (activeTrackId !== 0 && this.subsTail?.trackId !== activeTrackId) {
41-
Dependency.linkSubscriber(this, System.activeSub!);
41+
Dependency.link(this, System.activeSub!);
4242
}
4343
return this.cachedValue!;
4444
}

src/effect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ export class Effect<T = any> implements IEffect {
2525
) {
2626
const activeTrackId = System.activeTrackId;
2727
if (activeTrackId !== 0) {
28-
Dependency.linkSubscriber(this, System.activeSub!);
28+
Dependency.link(this, System.activeSub!);
2929
return;
3030
}
3131
const activeEffectScopeTrackId = System.activeEffectScopeTrackId;
3232
if (activeEffectScopeTrackId !== 0) {
33-
Dependency.linkSubscriber(this, System.activeEffectScope!);
33+
Dependency.link(this, System.activeEffectScope!);
3434
}
3535
}
3636

src/signal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class Signal<T = any> implements Dependency {
2323
get() {
2424
const activeTrackId = System.activeTrackId;
2525
if (activeTrackId !== 0 && this.subsTail?.trackId !== activeTrackId) {
26-
Dependency.linkSubscriber(this, System.activeSub!);
26+
Dependency.link(this, System.activeSub!);
2727
}
2828
return this.currentValue!;
2929
}

src/system.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export namespace Dependency {
8282

8383
const system = System;
8484

85-
export function linkSubscriber(dep: Link['dep'], sub: Link['sub']) {
85+
export function link(dep: Link['dep'], sub: Link['sub']) {
8686
const depsTail = sub.depsTail;
8787
const old = depsTail !== undefined
8888
? depsTail.nextDep

0 commit comments

Comments
 (0)