]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types: exports watch api types (#562)
authorYang Mingshan <y.mingshan3@gmail.com>
Mon, 30 Dec 2019 16:19:57 +0000 (00:19 +0800)
committerEvan You <yyx990803@gmail.com>
Mon, 30 Dec 2019 16:19:57 +0000 (11:19 -0500)
packages/runtime-core/src/apiWatch.ts

index f12a4f2a11ba25ab3aea21a58c15f09bee8c943c..7f3016e9812c65ffb7cb32ed2479bb52fc5d4a02 100644 (file)
@@ -45,9 +45,9 @@ export interface WatchOptions {
   onTrigger?: ReactiveEffectOptions['onTrigger']
 }
 
-type StopHandle = () => void
+export type StopHandle = () => void
 
-type WatcherSource<T = any> = Ref<T> | ComputedRef<T> | (() => T)
+export type WatcherSource<T = any> = Ref<T> | ComputedRef<T> | (() => T)
 
 type MapSources<T> = {
   [K in keyof T]: T[K] extends WatcherSource<infer V> ? V : never
@@ -55,7 +55,7 @@ type MapSources<T> = {
 
 export type CleanupRegistrator = (invalidate: () => void) => void
 
-type SimpleEffect = (onCleanup: CleanupRegistrator) => void
+export type SimpleEffect = (onCleanup: CleanupRegistrator) => void
 
 const invoke = (fn: Function) => fn()