]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat: interop with object syntax in all builds
authorEvan You <yyx990803@gmail.com>
Wed, 3 Oct 2018 17:16:54 +0000 (13:16 -0400)
committerEvan You <yyx990803@gmail.com>
Wed, 3 Oct 2018 17:16:54 +0000 (13:16 -0400)
packages/core/src/optional/keepAlive.ts
packages/core/src/vdom.ts

index ca3de37cf13ffa1d81bd6d8ed6e0f1ef7e9613b0..10eef597080e7e4c0551b137b7c5ad7288e43033 100644 (file)
@@ -49,7 +49,7 @@ export class KeepAlive extends Component<{}, KeepAliveProps> {
     this.keys.delete(key)
   }
 
-  render(_: any, { props, slots }: { props: any; slots: Slots }) {
+  render(_: any, { props, slots }: { props: KeepAliveProps; slots: Slots }) {
     if (!slots.default) {
       return
     }
@@ -98,7 +98,7 @@ export class KeepAlive extends Component<{}, KeepAliveProps> {
     } else {
       keys.add(key)
       // prune oldest entry
-      if (max && keys.size > parseInt(max, 10)) {
+      if (max && keys.size > parseInt(max as string, 10)) {
         this.pruneCacheEntry(Array.from(this.keys)[0])
       }
     }
index a584a3e91c1acec0d05a480b9d9af44874123592..9f3185c042a468cc0ef91141160f3c441cb1004d 100644 (file)
@@ -128,7 +128,7 @@ export function createComponentVNode(
 
   // flags
   const compType = typeof comp
-  if (__COMPAT__ && compType === 'object') {
+  if (compType === 'object') {
     if (comp.functional) {
       // object literal functional
       flags = VNodeFlags.COMPONENT_FUNCTIONAL