diff --git a/types/test/v3/define-component-test.tsx b/types/test/v3/define-component-test.tsx index dc71b44e466..9c9a25bea80 100644 --- a/types/test/v3/define-component-test.tsx +++ b/types/test/v3/define-component-test.tsx @@ -1138,3 +1138,10 @@ defineComponent({ } } }) + +// https://github.com/vuejs/vue/issues/12628#issuecomment-1177258223 +defineComponent({ + render(h) { + return h('div', {}, [...this.$slots.default!]) + } +}) diff --git a/types/v3-component-public-instance.d.ts b/types/v3-component-public-instance.d.ts index 6734c596ac1..585f66de37a 100644 --- a/types/v3-component-public-instance.d.ts +++ b/types/v3-component-public-instance.d.ts @@ -18,6 +18,7 @@ import { ComponentOptionsBase } from './v3-component-options' import { EmitFn, EmitsOptions, Slots } from './v3-setup-context' +import { VNode } from './vnode' /** * Custom properties added to component instances in any way and can be accessed through `this` @@ -162,7 +163,8 @@ export type ComponentPublicInstance< > $attrs: Data $refs: Data - $slots: Slots + $slots: Record + $scopedSlots: Slots $root: ComponentPublicInstance | null $parent: ComponentPublicInstance | null $emit: EmitFn