Skip to content

defineSlots<SlotInterface>() missing slotNames #10425

@el-j

Description

@el-j

Vue version

latest

Link to minimal reproduction

no link provided, same in every vue component.

Steps to reproduce

Try to get the name(s) of the (named) slots that are useable with an imported component.

there is no way in knowing the names of the slots that can be used. even if there is a slot-interface, the names of the slots are unknown, and so not really use full.

there must be a way to get the slotNames of the typed defineSlots().

What is expected?

const slots = defineSlots()

slots should at least have the names of the slots from the definedSlots SlotInterface.

What is actually happening?

slots are not known, slots are not accessible, defined slots from components are not useable as the names are not known to the user.

System Info

mac m3
vs code 
vue latest

Any additional comments?

assign the slotsNames to props or something like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need more infoFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions