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 (vuejs#6821)

fix vuejs#6820
  • Loading branch information
sxzz authored and zhangzhonghe committed Apr 12, 2023
1 parent f306688 commit 03097f6
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 03097f6

Please sign in to comment.