diff --git a/packages/global.d.ts b/packages/global.d.ts index 704f6d0220d..78fcaca777c 100644 --- a/packages/global.d.ts +++ b/packages/global.d.ts @@ -1,5 +1,8 @@ /// +// fixed by xxxxxx +declare const UTSObjectMarker: unique symbol + // Global compile-time constants declare var __DEV__: boolean declare var __TEST__: boolean diff --git a/packages/reactivity/src/ref.ts b/packages/reactivity/src/ref.ts index 5c65a1b3e0f..86e6cc341a6 100644 --- a/packages/reactivity/src/ref.ts +++ b/packages/reactivity/src/ref.ts @@ -537,8 +537,11 @@ export type UnwrapRefSimple = T extends ? WeakSet> & UnwrapRef>> : T extends ReadonlyArray ? { [K in keyof T]: UnwrapRefSimple } - : T extends object & { [ShallowReactiveMarker]?: never } - ? { - [P in keyof T]: P extends symbol ? T[P] : UnwrapRef - } - : T + : // fixed by xxxxxx + T extends { [UTSObjectMarker]?: true } + ? T + : T extends object & { [ShallowReactiveMarker]?: never } + ? { + [P in keyof T]: P extends symbol ? T[P] : UnwrapRef + } + : T