Home > @xoram/plugin-panoramique > ComponentDefinitionHelpers
ComponentDefinitionHelpers interface
Provide tools to describe a ComponentHarness in a composable way instead of using the option syntax.
Signature:
export interface ComponentDefinitionHelpers<component extends Component>
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
<prop extends keyof ComponentProps<component>>(this: void, prop: prop, value: MaybeRefOrGetter<NonNullable<ComponentProps<component>[prop]>>, ...modifiers: string[]) => void | Provide a value to one of the component's prop. The value can be a direct value, a reactive one or a getter (see ). Any value set on a non-prop will be bound on the component's root unless it is a fragment, see [Vue's guide on Fallthrough Attributes](https://vuejs.org/guide/components/attrs.html\#fallthrough-attributes). | ||
<event extends keyof HarnessListenableEvents<component>>(this: void, event: event, handler: NonNullable<HarnessListenableEvents<component>[event]>) => void | Listen for an event emitted by the component. Multiple listeners can be bound on the same event by calling this function multiple time, invocation order is not guarantied. Any handler set on a non-emit event will be bound on the component's root unless it is a fragment, see [Vue's guide on Fallthrough Attributes](https://vuejs.org/guide/components/attrs.html\#fallthrough-attributes). | ||
(this: void, childId: string, slotName?: keyof RemoveIndex<ComponentSlots<component>> & string, index?: number) => void | Insert a child in one of the component's slots. |