feat(types): expose DeepReadonly type (#1606)
This commit is contained in:
@@ -74,7 +74,7 @@ export function shallowReactive<T extends object>(target: T): T {
|
||||
|
||||
type Primitive = string | number | boolean | bigint | symbol | undefined | null
|
||||
type Builtin = Primitive | Function | Date | Error | RegExp
|
||||
type DeepReadonly<T> = T extends Builtin
|
||||
export type DeepReadonly<T> = T extends Builtin
|
||||
? T
|
||||
: T extends Map<infer K, infer V>
|
||||
? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>
|
||||
|
||||
Reference in New Issue
Block a user