refactor: adjust internal vnode types + more dts tests

This commit is contained in:
Evan You
2019-11-04 18:38:55 -05:00
parent 957d3a0547
commit dfc7c0f12a
23 changed files with 489 additions and 318 deletions

View File

@@ -19,7 +19,8 @@ import { recordEffect } from './apiReactivity'
import {
currentInstance,
ComponentInternalInstance,
currentSuspense
currentSuspense,
Data
} from './component'
import {
ErrorCodes,
@@ -219,7 +220,7 @@ export function instanceWatch(
cb: Function,
options?: WatchOptions
): StopHandle {
const ctx = this.renderProxy!
const ctx = this.renderProxy as Data
const getter = isString(source) ? () => ctx[source] : source.bind(ctx)
const stop = watch(getter, cb.bind(ctx), options)
onBeforeUnmount(stop, this)