File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ export function shallowReactive<T extends object>(
135135}
136136
137137type Primitive = string | number | boolean | bigint | symbol | undefined | null
138- type Builtin = Primitive | Function | Date | Error | RegExp
138+ export type Builtin = Primitive | Function | Date | Error | RegExp
139139export type DeepReadonly < T > = T extends Builtin
140140 ? T
141141 : T extends Map < infer K , infer V >
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
2121 toRaw ,
2222 toReactive ,
2323} from './reactive'
24- import type { ShallowReactiveMarker } from './reactive'
24+ import type { Builtin , ShallowReactiveMarker } from './reactive'
2525import { type Dep , createDep } from './dep'
2626import { ComputedRefImpl } from './computed'
2727import { getDepFromReactive } from './reactiveEffect'
@@ -475,11 +475,6 @@ function propertyToRef(
475475 : ( new ObjectRefImpl ( source , key , defaultValue ) as any )
476476}
477477
478- // corner case when use narrows type
479- // Ex. type RelativePath = string & { __brand: unknown }
480- // RelativePath extends object -> true
481- type BaseTypes = string | number | boolean
482-
483478/**
484479 * This is a special exported interface for other packages to declare
485480 * additional types that should bail out for ref unwrapping. For example
@@ -509,8 +504,7 @@ export type UnwrapRef<T> =
509504 : UnwrapRefSimple < T >
510505
511506export type UnwrapRefSimple < T > = T extends
512- | Function
513- | BaseTypes
507+ | Builtin
514508 | Ref
515509 | RefUnwrapBailTypes [ keyof RefUnwrapBailTypes ]
516510 | { [ RawSymbol ] ?: true }
Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ export interface LegacyPublicProperties {
4646 $set < T extends Record < keyof any , any > , K extends keyof T > (
4747 target : T ,
4848 key : K ,
49- value : T [ K ]
49+ value : T [ K ] ,
5050 ) : void
5151 $delete < T extends Record < keyof any , any > , K extends keyof T > (
5252 target : T ,
53- key : K
53+ key : K ,
5454 ) : void
5555 $mount ( el ?: string | Element ) : this
5656 $destroy ( ) : void
You can’t perform that action at this time.
0 commit comments