Skip to content

Commit aa757e8

Browse files
authored
fix(types): fix this type of this.$watch (#2022)
1 parent 93b8ff9 commit aa757e8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/runtime-core/src/componentPublicInstance.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ComponentInternalInstance, Data } from './component'
22
import { nextTick, queueJob } from './scheduler'
3-
import { instanceWatch } from './apiWatch'
3+
import { instanceWatch, WatchOptions, WatchStopHandle } from './apiWatch'
44
import {
55
EMPTY_OBJ,
66
hasOwn,
@@ -162,7 +162,11 @@ export type ComponentPublicInstance<
162162
$options: Options
163163
$forceUpdate: ReactiveEffect
164164
$nextTick: typeof nextTick
165-
$watch: typeof instanceWatch
165+
$watch(
166+
source: string | Function,
167+
cb: Function,
168+
options?: WatchOptions
169+
): WatchStopHandle
166170
} & P &
167171
ShallowUnwrapRef<B> &
168172
D &

0 commit comments

Comments
 (0)