Skip to content

Commit

Permalink
fix(types): fix this type of this.$watch (#2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Sep 2, 2020
1 parent 93b8ff9 commit aa757e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/runtime-core/src/componentPublicInstance.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentInternalInstance, Data } from './component'
import { nextTick, queueJob } from './scheduler'
import { instanceWatch } from './apiWatch'
import { instanceWatch, WatchOptions, WatchStopHandle } from './apiWatch'
import {
EMPTY_OBJ,
hasOwn,
Expand Down Expand Up @@ -162,7 +162,11 @@ export type ComponentPublicInstance<
$options: Options
$forceUpdate: ReactiveEffect
$nextTick: typeof nextTick
$watch: typeof instanceWatch
$watch(
source: string | Function,
cb: Function,
options?: WatchOptions
): WatchStopHandle
} & P &
ShallowUnwrapRef<B> &
D &
Expand Down

0 comments on commit aa757e8

Please sign in to comment.