Skip to content

Commit 3980ad6

Browse files
yangmingshanyyx990803
authored andcommitted
types: exports watch api types (#562)
1 parent f8b7ad5 commit 3980ad6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/runtime-core/src/apiWatch.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ export interface WatchOptions {
4545
onTrigger?: ReactiveEffectOptions['onTrigger']
4646
}
4747

48-
type StopHandle = () => void
48+
export type StopHandle = () => void
4949

50-
type WatcherSource<T = any> = Ref<T> | ComputedRef<T> | (() => T)
50+
export type WatcherSource<T = any> = Ref<T> | ComputedRef<T> | (() => T)
5151

5252
type MapSources<T> = {
5353
[K in keyof T]: T[K] extends WatcherSource<infer V> ? V : never
5454
}
5555

5656
export type CleanupRegistrator = (invalidate: () => void) => void
5757

58-
type SimpleEffect = (onCleanup: CleanupRegistrator) => void
58+
export type SimpleEffect = (onCleanup: CleanupRegistrator) => void
5959

6060
const invoke = (fn: Function) => fn()
6161

0 commit comments

Comments
 (0)