diff --git a/packages/vue/macros.d.ts b/packages/vue/macros.d.ts index a0a9f54d306..41aefd77d7f 100644 --- a/packages/vue/macros.d.ts +++ b/packages/vue/macros.d.ts @@ -16,17 +16,21 @@ export declare const enum RefTypes { WritableComputedRef = 3 } -type RefValue = T extends null | undefined - ? T - : T & { [RefType]?: RefTypes.Ref } +type RefValue = T extends null | undefined ? T : ReactiveVariable -type ComputedRefValue = T extends null | undefined - ? T - : T & { [RefType]?: RefTypes.ComputedRef } +type ReactiveVariable = T & { [RefType]?: RefTypes.Ref } + +type ComputedRefValue = T extends null | undefined ? T : ComputedVariable + +type ComputedVariable = T & { [RefType]?: RefTypes.ComputedRef } type WritableComputedRefValue = T extends null | undefined ? T - : T & { [RefType]?: RefTypes.WritableComputedRef } + : WritableComputedVariable + +type WritableComputedVariable = T & { + [RefType]?: RefTypes.WritableComputedRef +} type NormalObject = T & { [RefType]?: never }