]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types: fix Typescript 4.1 compile error (#2219)
authorNathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Mon, 28 Sep 2020 16:39:14 +0000 (09:39 -0700)
committerGitHub <noreply@github.com>
Mon, 28 Sep 2020 16:39:14 +0000 (12:39 -0400)
close #2218

packages/reactivity/src/collectionHandlers.ts

index f7ae9ae5dc6eaf3f7008ad1347d3d9a2756e963f..93d09770c9a684491fbd43fc7a1daf5e6c0eabce 100644 (file)
@@ -21,7 +21,7 @@ const toReactive = <T extends unknown>(value: T): T =>
   isObject(value) ? reactive(value) : value
 
 const toReadonly = <T extends unknown>(value: T): T =>
-  isObject(value) ? readonly(value) : value
+  isObject(value) ? readonly(value as Record<any, any>) : value
 
 const toShallow = <T extends unknown>(value: T): T => value