File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ export function shallowReactive<T extends object>(
141141}
142142
143143type Primitive = string | number | boolean | bigint | symbol | undefined | null
144- type Builtin = Primitive | Function | Date | Error | RegExp
144+ export type Builtin = Primitive | Function | Date | Error | RegExp
145145export type DeepReadonly < T > = T extends Builtin
146146 ? T
147147 : T extends Map < infer K , infer V >
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import {
1515 isReadonly ,
1616 isShallow
1717} from './reactive'
18- import type { ShallowReactiveMarker } from './reactive'
18+ import type { Builtin , ShallowReactiveMarker } from './reactive'
1919import { CollectionTypes } from './collectionHandlers'
2020import { createDep , Dep } from './dep'
2121
@@ -138,10 +138,7 @@ class RefImpl<T> {
138138 public dep ?: Dep = undefined
139139 public readonly __v_isRef = true
140140
141- constructor (
142- value : T ,
143- public readonly __v_isShallow : boolean
144- ) {
141+ constructor ( value : T , public readonly __v_isShallow : boolean ) {
145142 this . _rawValue = __v_isShallow ? value : toRaw ( value )
146143 this . _value = __v_isShallow ? value : toReactive ( value )
147144 }
@@ -491,8 +488,7 @@ export type UnwrapRef<T> = T extends ShallowRef<infer V>
491488 : UnwrapRefSimple < T >
492489
493490export type UnwrapRefSimple < T > = T extends
494- | Function
495- | Date
491+ | Builtin
496492 | CollectionTypes
497493 | BaseTypes
498494 | Ref
You can’t perform that action at this time.
0 commit comments