]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(reactive): remove unref type assertion (#8007)
author丶远方 <yangpanteng@gmail.com>
Thu, 6 Apr 2023 09:15:27 +0000 (17:15 +0800)
committerGitHub <noreply@github.com>
Thu, 6 Apr 2023 09:15:27 +0000 (17:15 +0800)
packages/reactivity/src/ref.ts

index 5dd31a9f8cad79eb50e987863e3547c00f4e9a22..b04c393669bed36e36022327bc0147131614665d 100644 (file)
@@ -209,7 +209,7 @@ export type MaybeRefOrGetter<T = any> = MaybeRef<T> | (() => T)
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#unref}
  */
 export function unref<T>(ref: MaybeRef<T>): T {
-  return isRef(ref) ? (ref.value as any) : ref
+  return isRef(ref) ? ref.value : ref
 }
 
 /**