Closed
Description
Version
2.6.8
Reproduction link
https://github.com/romansp/functional-scoped-slots-type
Steps to reproduce
yarn install
yarn serve
What is expected?
yarn serve
without errors
What is actually happening?
Type error:
Argument of type '{ functional: boolean; render(h: CreateElement, ctx: RenderContext<Record<never, any>>): string | true | VNode | ScopedSlotReturnArray; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>'.
Object literal may only specify known properties, and 'functional' does not exist in type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>
, Record<string, any>>'.
15 |
16 | export default Vue.extend({
> 17 | functional: true,
| ^
18 | render(h, ctx) {
19 | const children = ctx.scopedSlots.default && ctx.scopedSlots.default({});
20 | return children || h();
Version: typescript 3.3.3333
PR #9563 introduced NormalizedScopedSlot
type, but RenderContext
type for functional components still uses scopedSlots: { [key: string]: ScopedSlot };
. Is it expected?