]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(types/reactivity): add generics constraint for markNonReactive
authorEvan You <yyx990803@gmail.com>
Sat, 4 Apr 2020 01:05:55 +0000 (21:05 -0400)
committerEvan You <yyx990803@gmail.com>
Sat, 4 Apr 2020 01:06:03 +0000 (21:06 -0400)
fix #917

packages/reactivity/src/reactive.ts

index a6f21aadd8ee5204ede499376153f5a36f35f56a..bc1b72524a842919435a1a328d468707e88bb61e 100644 (file)
@@ -161,7 +161,7 @@ export function markReadonly<T>(value: T): T {
   return value
 }
 
-export function markNonReactive<T>(value: T): T {
+export function markNonReactive<T extends object>(value: T): T {
   nonReactiveValues.add(value)
   return value
 }