Skip to content

Commit 0e10eb2

Browse files
ArthurDarkstoneliliang18OrbisK
authored
fix(watchIgnorable): add and export types (#4809)
Co-authored-by: liliang18 <liliang18@tal.com> Co-authored-by: Robin <robin.kehl@singular-it.de>
1 parent 627ae2b commit 0e10eb2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/shared/watchIgnorable/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ import { bypassFilter, createFilterWrapper } from '../utils'
99
// Extended watch that exposes a ignoreUpdates(updater) function that allows to update the source without triggering effects
1010

1111
export type IgnoredUpdater = (updater: () => void) => void
12+
export type IgnoredPrevAsyncUpdates = () => void
1213

1314
export interface WatchIgnorableReturn {
1415
ignoreUpdates: IgnoredUpdater
15-
ignorePrevAsyncUpdates: () => void
16+
ignorePrevAsyncUpdates: IgnoredPrevAsyncUpdates
1617
stop: WatchStopHandle
1718
}
1819

@@ -36,8 +37,8 @@ export function watchIgnorable<Immediate extends Readonly<boolean> = false>(
3637
)
3738

3839
let ignoreUpdates: IgnoredUpdater
39-
let ignorePrevAsyncUpdates: () => void
40-
let stop: () => void
40+
let ignorePrevAsyncUpdates: IgnoredPrevAsyncUpdates
41+
let stop: WatchStopHandle
4142

4243
if (watchOptions.flush === 'sync') {
4344
let ignore = false

0 commit comments

Comments
 (0)