]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types: improve isRef typing (#578)
authorCarlos Rodrigues <david-181@hotmail.com>
Mon, 6 Jan 2020 21:15:49 +0000 (21:15 +0000)
committerEvan You <yyx990803@gmail.com>
Mon, 6 Jan 2020 21:15:49 +0000 (16:15 -0500)
packages/reactivity/src/ref.ts

index e2ff79e185961fc828834364a0da9814f18af8d7..b4127c11305dd71677b87fa4575428fe3ed571cf 100644 (file)
@@ -23,6 +23,7 @@ export interface Ref<T = any> {
 const convert = <T extends unknown>(val: T): T =>
   isObject(val) ? reactive(val) : val
 
+export function isRef<T>(r: Ref<T> | T): r is Ref<T>
 export function isRef(r: any): r is Ref {
   return r ? r._isRef === true : false
 }