import { Ref, UnwrapRef, ComputedRef, WritableComputedOptions, DebuggerOptions, WritableComputedRef } from '@vue/runtime-dom' declare const RefType: unique symbol declare const enum RefTypes { Ref = 1, ComputedRef = 2, WritableComputedRef = 3 } type RefValue = T extends null | undefined ? T : T & { [RefType]?: RefTypes.Ref } type ComputedRefValue = T extends null | undefined ? T : T & { [RefType]?: RefTypes.ComputedRef } type WritableComputedRefValue = T extends null | undefined ? T : T & { [RefType]?: RefTypes.WritableComputedRef } type NormalObject = T & { [RefType]?: never } /** * Vue ref transform macro for binding refs as reactive variables. */ declare function _$(arg: ComputedRef): ComputedRefValue declare function _$(arg: WritableComputedRef): WritableComputedRefValue declare function _$(arg: Ref): RefValue declare function _$(arg?: T): DestructureRefs type DestructureRefs = { [K in keyof T]: T[K] extends ComputedRef ? ComputedRefValue : T[K] extends WritableComputedRef ? WritableComputedRefValue : T[K] extends Ref ? RefValue : T[K] } /** * Vue ref transform macro for accessing underlying refs of reactive varaibles. */ declare function _$$(arg: NormalObject): ToRawRefs declare function _$$(value: RefValue): Ref declare function _$$(value: ComputedRefValue): ComputedRef declare function _$$( value: WritableComputedRefValue ): WritableComputedRef type ToRawRefs = { [K in keyof T]: T[K] extends RefValue ? Ref : T[K] extends ComputedRefValue ? ComputedRef : T[K] extends WritableComputedRefValue ? WritableComputedRef : T[K] extends object ? T[K] extends | Function | Map | Set | WeakMap | WeakSet ? T[K] : ToRawRefs : T[K] } declare function _$ref(arg?: T | Ref): RefValue> declare function _$shallowRef(arg?: T): RefValue declare function _$computed( getter: () => T, debuggerOptions?: DebuggerOptions ): ComputedRefValue declare function _$computed( options: WritableComputedOptions, debuggerOptions?: DebuggerOptions ): WritableComputedRefValue declare global { const $: typeof _$ const $$: typeof _$$ const $ref: typeof _$ref const $shallowRef: typeof _$shallowRef const $computed: typeof _$computed }