From 3980ad65de0e637fe45e3fdfec43a4fdef8e4d39 Mon Sep 17 00:00:00 2001 From: Yang Mingshan Date: Tue, 31 Dec 2019 00:19:57 +0800 Subject: [PATCH] types: exports watch api types (#562) --- packages/runtime-core/src/apiWatch.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index f12a4f2a..7f3016e9 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -45,9 +45,9 @@ export interface WatchOptions { onTrigger?: ReactiveEffectOptions['onTrigger'] } -type StopHandle = () => void +export type StopHandle = () => void -type WatcherSource = Ref | ComputedRef | (() => T) +export type WatcherSource = Ref | ComputedRef | (() => T) type MapSources = { [K in keyof T]: T[K] extends WatcherSource ? V : never @@ -55,7 +55,7 @@ type MapSources = { export type CleanupRegistrator = (invalidate: () => void) => void -type SimpleEffect = (onCleanup: CleanupRegistrator) => void +export type SimpleEffect = (onCleanup: CleanupRegistrator) => void const invoke = (fn: Function) => fn()