@empathyco/x-components
Version:
Empathy X Components
22 lines (13 loc) • 1.31 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [XComponentBusAPI](./x-components.xcomponentbusapi.md)
## XComponentBusAPI interface
API for emitting and subscribing to events of the XBus.
**Signature:**
```typescript
export interface XComponentBusAPI
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [emit](./x-components.xcomponentbusapi.emit.md) | | ((event: [PropsWithType](./x-components.propswithtype.md)<!-- --><[XEventsTypes](./x-components.xeventstypes.md)<!-- -->, void>) => void) & (<Event extends [XEvent](./x-components.xevent.md)<!-- -->>(event: Event, payload: [XEventPayload](./x-components.xeventpayload.md)<!-- --><Event>, metadata?: Omit<[WireMetadata](./x-components.wiremetadata.md)<!-- -->, 'moduleName' \| 'origin' \| 'location'>) => void) | Emits an event with the <code>void</code> type associated as payload. |
| [on](./x-components.xcomponentbusapi.on.md) | | [XBus](./x-components.xbus.md)<!-- --><[XEventsTypes](./x-components.xeventstypes.md)<!-- -->, [WireMetadata](./x-components.wiremetadata.md)<!-- -->>\['on'\] | Retrieves an observable for an event. |