Skip to content

Commit

Permalink
chore(reactivity): remove unnecessary type assertions. (#8046)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred-Skyblue authored Apr 10, 2023
1 parent 37701a8 commit 2ce23f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/reactivity/src/reactive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/reactivity/src/ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2ce23f0

Please sign in to comment.