Skip to content

Commit

Permalink
fix(types/reactivity-transform): fix type when initial value is not u…
Browse files Browse the repository at this point in the history
…sed (#6821)

fix #6820
  • Loading branch information
sxzz committed Nov 8, 2022
1 parent b3916db commit fdc5902
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/vue/macros.d.ts
Expand Up @@ -83,9 +83,11 @@ type ToRawRefs<T extends object> = {
: T[K]
}

export declare function $ref<T>(arg?: T | Ref<T>): RefValue<UnwrapRef<T>>
export declare function $ref<T>(): RefValue<T | undefined>
export declare function $ref<T>(arg: T | Ref<T>): RefValue<UnwrapRef<T>>

export declare function $shallowRef<T>(arg?: T): RefValue<T>
export declare function $shallowRef<T>(): RefValue<T | undefined>
export declare function $shallowRef<T>(arg: T): RefValue<T>

export declare function $toRef<T extends object, K extends keyof T>(
object: T,
Expand Down

0 comments on commit fdc5902

Please sign in to comment.