]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(types): use proper array type when unwrapping reactive array (#4807)
authorCheese <11363971+cheese-git@users.noreply.github.com>
Thu, 25 Nov 2021 10:41:25 +0000 (18:41 +0800)
committerGitHub <noreply@github.com>
Thu, 25 Nov 2021 10:41:25 +0000 (05:41 -0500)
packages/reactivity/src/ref.ts

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