Skip to content

[Question] In the future and Object slot typing be supported by this plugin #651

Open
@louiss0

Description

🧐 Problem Description

In Vue you are able to inject slots by using this syntax

<HelloWorld>
      { {
          default(props:Record<string, unknown>) {
          
            return props? props.value : "No props"

          }
        }
      }
 </HelloWorld>

But when I give types for slots I get no error regarding whether or not I'm typing the wrong one or not.

type Slots = SlotsType< { default(props: Record<string, unknown>): JSX.Element }>
export default defineComponent((props: { msg: string, value: number, }, ctx: SetupContext<null, Slots>) => {

 return <> {ctx.slots.default() } </>

}

🚑 Other information

Here is a repo You can use to get what I mean. Vue JSX Example

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions