From 985f4c91d9d3f47e1314d230c249b3faf79c6b90 Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Mon, 6 Jan 2020 21:15:49 +0000 Subject: [PATCH] types: improve isRef typing (#578) --- packages/reactivity/src/ref.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/reactivity/src/ref.ts b/packages/reactivity/src/ref.ts index e2ff79e1..b4127c11 100644 --- a/packages/reactivity/src/ref.ts +++ b/packages/reactivity/src/ref.ts @@ -23,6 +23,7 @@ export interface Ref { const convert = (val: T): T => isObject(val) ? reactive(val) : val +export function isRef(r: Ref | T): r is Ref export function isRef(r: any): r is Ref { return r ? r._isRef === true : false }