Skip to content

Commit

Permalink
Fixes shallowRef's return type
Browse files Browse the repository at this point in the history
  • Loading branch information
simlevesque authored Mar 7, 2023
1 parent a9ca2d8 commit 58638a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v3/reactivity/ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export type ShallowRef<T = any> = Ref<T> & { [ShallowRefMarker]?: true }

export function shallowRef<T extends object>(
value: T
): T extends Ref ? T : ShallowRef<T>
): [T] extends [Ref] ? T : ShallowRef<T>
export function shallowRef<T>(value: T): ShallowRef<T>
export function shallowRef<T = any>(): ShallowRef<T | undefined>
export function shallowRef(value?: unknown) {
Expand Down

0 comments on commit 58638a5

Please sign in to comment.