feat: interop with object syntax in all builds

This commit is contained in:
Evan You 2018-10-03 13:16:54 -04:00
parent 8024f058cc
commit 848b92070b
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ export class KeepAlive extends Component<{}, KeepAliveProps> {
this.keys.delete(key) this.keys.delete(key)
} }
render(_: any, { props, slots }: { props: any; slots: Slots }) { render(_: any, { props, slots }: { props: KeepAliveProps; slots: Slots }) {
if (!slots.default) { if (!slots.default) {
return return
} }
@ -98,7 +98,7 @@ export class KeepAlive extends Component<{}, KeepAliveProps> {
} else { } else {
keys.add(key) keys.add(key)
// prune oldest entry // 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]) this.pruneCacheEntry(Array.from(this.keys)[0])
} }
} }

View File

@ -128,7 +128,7 @@ export function createComponentVNode(
// flags // flags
const compType = typeof comp const compType = typeof comp
if (__COMPAT__ && compType === 'object') { if (compType === 'object') {
if (comp.functional) { if (comp.functional) {
// object literal functional // object literal functional
flags = VNodeFlags.COMPONENT_FUNCTIONAL flags = VNodeFlags.COMPONENT_FUNCTIONAL