File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/shared/watchAtMost Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ export interface WatchAtMostOptions<Immediate> extends WatchWithFilterOptions<Im
1010
1111export interface WatchAtMostReturn {
1212 stop : WatchStopHandle
13+ pause : ( ) => void
14+ resume : ( ) => void
1315 count : ShallowRef < number >
1416}
1517
@@ -31,7 +33,7 @@ export function watchAtMost<Immediate extends Readonly<boolean> = false>(
3133
3234 const current = shallowRef ( 0 )
3335
34- const stop = watchWithFilter (
36+ const { stop, resume , pause } = watchWithFilter (
3537 source ,
3638 ( ...args ) => {
3739 current . value += 1
@@ -43,5 +45,5 @@ export function watchAtMost<Immediate extends Readonly<boolean> = false>(
4345 watchOptions ,
4446 )
4547
46- return { count : current , stop }
48+ return { count : current , stop, resume , pause }
4749}
You can’t perform that action at this time.
0 commit comments