fix(types): use proper array type when unwrapping reactive array (#4807)

This commit is contained in:
Cheese 2021-11-25 18:41:25 +08:00 committed by GitHub
parent 3bdd03b152
commit 89c54ee2b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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]>