File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -140,8 +140,15 @@ export function shallowReactive<T extends object>(
140140 )
141141}
142142
143- type Primitive = string | number | boolean | bigint | symbol | undefined | null
144- export type Builtin = Primitive | Function | Date | Error | RegExp
143+ export type Primitive =
144+ | string
145+ | number
146+ | boolean
147+ | bigint
148+ | symbol
149+ | undefined
150+ | null
151+ export type Builtin = Function | Date | Error | RegExp
145152export type DeepReadonly < T > = T extends Builtin
146153 ? T
147154 : T extends Map < infer K , infer V >
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import {
1616 isReadonly ,
1717 isShallow
1818} from './reactive'
19- import type { Builtin , ShallowReactiveMarker } from './reactive'
19+ import type { Builtin , Primitive , ShallowReactiveMarker } from './reactive'
2020import { createDep , Dep } from './dep'
2121
2222declare const RefSymbol : unique symbol
@@ -484,6 +484,7 @@ export type UnwrapRef<T> = T extends ShallowRef<infer V>
484484 : UnwrapRefSimple < T >
485485
486486export type UnwrapRefSimple < T > = T extends
487+ | Primitive
487488 | Builtin
488489 | Ref
489490 | RefUnwrapBailTypes [ keyof RefUnwrapBailTypes ]
You can’t perform that action at this time.
0 commit comments