Просмотр исходного кода

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

Damian Głowala 1 год назад
Родитель
Сommit
998dca59f1
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 1
      packages/runtime-core/src/apiWatch.ts
  2. 1 0
      packages/runtime-core/src/index.ts

+ 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
 const INITIAL_WATCHER_VALUE = {}
 
-type MultiWatchSources = (WatchSource<unknown> | object)[]
+export type MultiWatchSources = (WatchSource<unknown> | object)[]
 
 // overload: single source + cb
 export function watch<T, Immediate extends Readonly<boolean> = false>(

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

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