diff --git a/packages/runtime-core/__tests__/apiApp.spec.ts b/packages/runtime-core/__tests__/apiApp.spec.ts
index fa91792e6..91ddfbb1e 100644
--- a/packages/runtime-core/__tests__/apiApp.spec.ts
+++ b/packages/runtime-core/__tests__/apiApp.spec.ts
@@ -23,8 +23,8 @@ describe('api: createApp', () => {
default: 0
}
},
- render() {
- return this.count
+ setup(props: { count: number }) {
+ return () => props.count
}
}
diff --git a/packages/runtime-core/__tests__/apiCreateComponent.spec.tsx b/packages/runtime-core/__tests__/apiCreateComponent.spec.tsx
index 991f82643..f1ebdf543 100644
--- a/packages/runtime-core/__tests__/apiCreateComponent.spec.tsx
+++ b/packages/runtime-core/__tests__/apiCreateComponent.spec.tsx
@@ -1,4 +1,4 @@
-import { createComponent, ComponentRenderProxy } from '../src/component'
+import { createComponent } from '../src/component'
import { ref } from '@vue/reactivity'
import { PropType } from '../src/componentProps'
import { h } from '../src/h'
@@ -56,7 +56,7 @@ test('createComponent type inference', () => {
this.d.e.slice()
this.cc && this.cc.push('hoo')
this.dd.push('dd')
- // return h('div', this.bb)
+ return h('div', this.bb)
}
})
// test TSX props inference
@@ -75,7 +75,7 @@ test('type inference w/ optional props declaration', () => {
this.$props.msg
this.msg
this.a * 2
- // return h('div', this.msg)
+ return h('div', this.msg)
}
})
;(
= < - This extends ComponentRenderProxy
->(
- this: This
-) => VNodeChild
-
interface ComponentOptionsBase<
Props,
RawBindings,
@@ -71,47 +65,53 @@ interface ComponentOptionsBase<
M extends MethodOptions
> extends LegacyOptions = {
type: FunctionalComponent | ComponentOptions
parent: ComponentInstance | null
@@ -159,7 +161,7 @@ export type ComponentInstance = {
next: VNode | null
subTree: VNode
update: ReactiveEffect
- render: RenderFunction | null
+ render: RenderFunction | null
effects: ReactiveEffect[] | null
provides: Data
@@ -211,7 +213,7 @@ export function createComponent<
>(
options: ComponentOptionsWithoutProps {
diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts
index 57b5b1411..2bee91c10 100644
--- a/packages/runtime-core/src/vnode.ts
+++ b/packages/runtime-core/src/vnode.ts
@@ -28,7 +28,7 @@ export type VNodeTypes =
| typeof Text
| typeof Empty
-type VNodeChildAtom = VNode | string | number | null | void
+type VNodeChildAtom = VNode | string | number | boolean | null | void
export interface VNodeChildren extends Array