Ver Fonte

feat(types): export `MultiWatchSources` type (#9563)

Damian Głowala há 1 ano atrás
pai
commit
998dca59f1

+ 1 - 1
packages/runtime-core/src/apiWatch.ts

@@ -112,7 +112,7 @@ export function watchSyncEffect(
 // initial value for watchers to trigger on undefined initial values
 // initial value for watchers to trigger on undefined initial values
 const INITIAL_WATCHER_VALUE = {}
 const INITIAL_WATCHER_VALUE = {}
 
 
-type MultiWatchSources = (WatchSource<unknown> | object)[]
+export type MultiWatchSources = (WatchSource<unknown> | object)[]
 
 
 // overload: single source + cb
 // overload: single source + cb
 export function watch<T, Immediate extends Readonly<boolean> = false>(
 export function watch<T, Immediate extends Readonly<boolean> = false>(

+ 1 - 0
packages/runtime-core/src/index.ts

@@ -224,6 +224,7 @@ export type {
   Reactive,
   Reactive,
 } from '@vue/reactivity'
 } from '@vue/reactivity'
 export type {
 export type {
+  MultiWatchSources,
   WatchEffect,
   WatchEffect,
   WatchOptions,
   WatchOptions,
   WatchOptionsBase,
   WatchOptionsBase,