From: Evan You Date: Wed, 3 Oct 2018 17:16:54 +0000 (-0400) Subject: feat: interop with object syntax in all builds X-Git-Tag: v3.0.0-alpha.0~1147 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=848b92070ba3488af9c0a96b9f983b81e97c45c0;p=thirdparty%2Fvuejs%2Fcore.git feat: interop with object syntax in all builds --- diff --git a/packages/core/src/optional/keepAlive.ts b/packages/core/src/optional/keepAlive.ts index ca3de37cf1..10eef59708 100644 --- a/packages/core/src/optional/keepAlive.ts +++ b/packages/core/src/optional/keepAlive.ts @@ -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]) } } diff --git a/packages/core/src/vdom.ts b/packages/core/src/vdom.ts index a584a3e91c..9f3185c042 100644 --- a/packages/core/src/vdom.ts +++ b/packages/core/src/vdom.ts @@ -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