Browse Source

chore(types): remove unnecessary type assertion (#12563)

webfansplz 3 years ago
parent
commit
ff2d52f7ac
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/v3/apiWatch.ts

+ 2 - 2
src/v3/apiWatch.ts

@@ -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 {