Skip to content

Commit c94d305

Browse files
committed
refactor(reactivity): rename processEffectNotifications to flush
1 parent 0dfda23 commit c94d305

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/reactivity/src/computed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { hasChanged, isFunction } from '@vue/shared'
22
import { ReactiveFlags, TrackOpTypes } from './constants'
33
import { onTrack, setupOnTrigger } from './debug'
4-
import { type DebuggerEvent, type DebuggerOptions } from './effect'
4+
import type { DebuggerEvent, DebuggerOptions } from './effect'
55
import { activeEffectScope } from './effectScope'
66
import type { Ref } from './ref'
77
import {

packages/reactivity/src/ref.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import {
2424
ReactiveFlags as _ReactiveFlags,
2525
activeSub,
2626
batchDepth,
27+
flush,
2728
link,
28-
processEffectNotifications,
2929
propagate,
3030
shallowPropagate,
3131
} from './system'
@@ -183,7 +183,7 @@ class RefImpl<T = any> implements ReactiveNode {
183183
}
184184
propagate(subs)
185185
if (!batchDepth) {
186-
processEffectNotifications()
186+
flush()
187187
}
188188
if (__DEV__) {
189189
triggerEventInfos.pop()
@@ -230,7 +230,7 @@ export function triggerRef(ref: Ref): void {
230230
propagate(dep.subs)
231231
shallowPropagate(dep.subs)
232232
if (!batchDepth) {
233-
processEffectNotifications()
233+
flush()
234234
}
235235
}
236236
}

packages/reactivity/src/system.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function startBatch(): void {
6060

6161
export function endBatch(): void {
6262
if (!--batchDepth && notifyBufferLength) {
63-
processEffectNotifications()
63+
flush()
6464
}
6565
}
6666

@@ -243,7 +243,7 @@ export function endTracking(
243243
activeSub = prevSub
244244
}
245245

246-
export function processEffectNotifications(): void {
246+
export function flush(): void {
247247
while (notifyIndex < notifyBufferLength) {
248248
const effect = notifyBuffer[notifyIndex]!
249249
notifyBuffer[notifyIndex++] = undefined

0 commit comments

Comments
 (0)