Skip to content

Commit

Permalink
fix(types): ensure that DeepReadonly handles Ref type properly (#4714)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusBorg committed Oct 7, 2021
1 parent 1779ff8 commit ed0071a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/reactivity/src/reactive.ts
Expand Up @@ -132,6 +132,8 @@ export type DeepReadonly<T> = T extends Builtin
? WeakSet<DeepReadonly<U>>
: T extends Promise<infer U>
? Promise<DeepReadonly<U>>
: T extends Ref<infer U>
? Ref<DeepReadonly<U>>
: T extends {}
? { readonly [K in keyof T]: DeepReadonly<T[K]> }
: Readonly<T>
Expand Down

0 comments on commit ed0071a

Please sign in to comment.