|
|
@@ -21,7 +21,7 @@ import {
|
|
|
toRaw,
|
|
|
toReactive,
|
|
|
} from './reactive'
|
|
|
-import type { ShallowReactiveMarker } from './reactive'
|
|
|
+import type { Builtin, ShallowReactiveMarker } from './reactive'
|
|
|
import { type Dep, createDep } from './dep'
|
|
|
import { ComputedRefImpl } from './computed'
|
|
|
import { getDepFromReactive } from './reactiveEffect'
|
|
|
@@ -475,11 +475,6 @@ function propertyToRef(
|
|
|
: (new ObjectRefImpl(source, key, defaultValue) as any)
|
|
|
}
|
|
|
|
|
|
-// corner case when use narrows type
|
|
|
-// Ex. type RelativePath = string & { __brand: unknown }
|
|
|
-// RelativePath extends object -> true
|
|
|
-type BaseTypes = string | number | boolean
|
|
|
-
|
|
|
/**
|
|
|
* This is a special exported interface for other packages to declare
|
|
|
* additional types that should bail out for ref unwrapping. For example
|
|
|
@@ -509,8 +504,7 @@ export type UnwrapRef<T> =
|
|
|
: UnwrapRefSimple<T>
|
|
|
|
|
|
export type UnwrapRefSimple<T> = T extends
|
|
|
- | Function
|
|
|
- | BaseTypes
|
|
|
+ | Builtin
|
|
|
| Ref
|
|
|
| RefUnwrapBailTypes[keyof RefUnwrapBailTypes]
|
|
|
| { [RawSymbol]?: true }
|