From fdc5902cce0d077c722dfd422850ca69fd51be8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Tue, 8 Nov 2022 14:38:53 +0800 Subject: [PATCH] fix(types/reactivity-transform): fix type when initial value is not used (#6821) fix #6820 --- packages/vue/macros.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/vue/macros.d.ts b/packages/vue/macros.d.ts index 9df3f107cb2..68ccda6ee23 100644 --- a/packages/vue/macros.d.ts +++ b/packages/vue/macros.d.ts @@ -83,9 +83,11 @@ type ToRawRefs = { : T[K] } -export declare function $ref(arg?: T | Ref): RefValue> +export declare function $ref(): RefValue +export declare function $ref(arg: T | Ref): RefValue> -export declare function $shallowRef(arg?: T): RefValue +export declare function $shallowRef(): RefValue +export declare function $shallowRef(arg: T): RefValue export declare function $toRef( object: T,