mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-03 12:38:24 +08:00
chore(types): remove unnecessary type assertion (#12563)
This commit is contained in:
parent
86fb6bd151
commit
ff2d52f7ac
@ -221,7 +221,7 @@ function doWatch(
|
|||||||
} else if (isFunction(source)) {
|
} else if (isFunction(source)) {
|
||||||
if (cb) {
|
if (cb) {
|
||||||
// getter with cb
|
// getter with cb
|
||||||
getter = () => call(source as Function, WATCHER_GETTER)
|
getter = () => call(source, WATCHER_GETTER)
|
||||||
} else {
|
} else {
|
||||||
// no cb -> simple effect
|
// no cb -> simple effect
|
||||||
getter = () => {
|
getter = () => {
|
||||||
@ -231,7 +231,7 @@ function doWatch(
|
|||||||
if (cleanup) {
|
if (cleanup) {
|
||||||
cleanup()
|
cleanup()
|
||||||
}
|
}
|
||||||
return call(source as Function, WATCHER, [onCleanup])
|
return call(source, WATCHER, [onCleanup])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user