chore(reactivity): remove unnecessary type assertions. (#8046)

This commit is contained in:
丶远方 2023-04-10 14:06:56 +08:00 committed by GitHub
parent 37701a88c0
commit 2ce23f0e09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -414,4 +414,4 @@ export const toReactive = <T extends unknown>(value: T): T =>
* @param value - The value for which a readonly proxy shall be created.
*/
export const toReadonly = <T extends unknown>(value: T): T =>
isObject(value) ? readonly(value as Record<any, any>) : value
isObject(value) ? readonly(value) : value

View File

@ -432,7 +432,7 @@ export function toRef(
if (isRef(source)) {
return source
} else if (isFunction(source)) {
return new GetterRefImpl(source as () => unknown) as any
return new GetterRefImpl(source) as any
} else if (isObject(source) && arguments.length > 1) {
return propertyToRef(source, key!, defaultValue)
} else {