]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
revert: "fix(types): use proper array type when unwrapping reactive array (#4807)"
authorEvan You <yyx990803@gmail.com>
Fri, 26 Nov 2021 02:54:12 +0000 (10:54 +0800)
committerEvan You <yyx990803@gmail.com>
Fri, 26 Nov 2021 02:54:12 +0000 (10:54 +0800)
This reverts commit 89c54ee2b913381723048f8f26fc92ff114b3209.

packages/reactivity/src/ref.ts

index d37b6726ef945a62822e42a575b6e9c1223f49c5..93eb4fa89b07a6d28c305a9f3a3cf4b6586e33e5 100644 (file)
@@ -276,7 +276,7 @@ export type UnwrapRefSimple<T> = T extends
   | RefUnwrapBailTypes[keyof RefUnwrapBailTypes]
   ? T
   : T extends Array<any>
-  ? Array<UnwrapRefSimple<T[number]>>
+  ? { [K in keyof T]: UnwrapRefSimple<T[K]> }
   : T extends object & { [ShallowReactiveMarker]?: never }
   ? {
       [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]>