diff --git a/packages/reactivity/src/ref.ts b/packages/reactivity/src/ref.ts index 6b8d54181..6f1cacbd3 100644 --- a/packages/reactivity/src/ref.ts +++ b/packages/reactivity/src/ref.ts @@ -486,9 +486,15 @@ function propertyToRef( export interface RefUnwrapBailTypes {} export type ShallowUnwrapRef = { - [K in keyof T]: DistributeRef + readonly [K in keyof Pick>]: DistributeRef +} & { + [K in keyof Omit>]: DistributeRef } +type ReadonlyKeys = { + [K in keyof O]: O[K] extends Readonly ? K : never +}[keyof O] + type DistributeRef = T extends Ref ? V : T export type UnwrapRef =