Skip to content

Commit a49a332

Browse files
committed
refactor(system): rename startTrackDependencies to startTrack
1 parent 1eb3f12 commit a49a332

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/computed.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ export class Computed<T = any> implements IComputed {
4444
}
4545

4646
update() {
47-
const prevSub = Subscriber.startTrackDependencies(this);
47+
const prevSub = Subscriber.startTrack(this);
4848
const oldValue = this.cachedValue;
4949
let newValue: T;
5050
try {
5151
newValue = this.getter(oldValue);
5252
} finally {
53-
Subscriber.endTrackDependencies(this, prevSub);
53+
Subscriber.endTrack(this, prevSub);
5454
}
5555
if (oldValue !== newValue) {
5656
this.cachedValue = newValue;

src/effect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ export class Effect<T = any> implements IEffect {
5252
}
5353

5454
run() {
55-
const prevSub = Subscriber.startTrackDependencies(this);
55+
const prevSub = Subscriber.startTrack(this);
5656
try {
5757
return this.fn();
5858
} finally {
59-
Subscriber.endTrackDependencies(this, prevSub);
59+
Subscriber.endTrack(this, prevSub);
6060
}
6161
}
6262

src/system.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ export namespace Subscriber {
396396
} while (true);
397397
}
398398

399-
export function startTrackDependencies(sub: IComputed | IEffect) {
399+
export function startTrack(sub: IComputed | IEffect) {
400400
const newVersion = system.lastTrackId + 1;
401401
const prevSub = system.activeSub;
402402

@@ -411,7 +411,7 @@ export namespace Subscriber {
411411
return prevSub;
412412
}
413413

414-
export function endTrackDependencies(sub: IComputed | IEffect, prevSub: IComputed | IEffect | undefined) {
414+
export function endTrack(sub: IComputed | IEffect, prevSub: IComputed | IEffect | undefined) {
415415
if (prevSub !== undefined) {
416416
system.activeSub = prevSub;
417417
system.activeTrackId = prevSub.trackId;

0 commit comments

Comments
 (0)