Skip to content

Commit

Permalink
chore(uts): UTSObjectMarker
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Dec 4, 2024
1 parent e05d5f7 commit 69fd56a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions packages/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/// <reference types="vite/client" />

// fixed by xxxxxx
declare const UTSObjectMarker: unique symbol

// Global compile-time constants
declare var __DEV__: boolean
declare var __TEST__: boolean
Expand Down
13 changes: 8 additions & 5 deletions packages/reactivity/src/ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,11 @@ export type UnwrapRefSimple<T> = T extends
? WeakSet<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakSet<any>>>
: T extends ReadonlyArray<any>
? { [K in keyof T]: UnwrapRefSimple<T[K]> }
: T extends object & { [ShallowReactiveMarker]?: never }
? {
[P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]>
}
: 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[P]>
}
: T

0 comments on commit 69fd56a

Please sign in to comment.