@empathyco/x-components
Version:
Empathy X Components
78 lines (35 loc) • 1.53 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
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[emit](./x-components.xcomponentbusapi.emit.md)
</td><td>
</td><td>
((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)
</td><td>
Emits an event with the `void` type associated as payload.
</td></tr>
<tr><td>
[on](./x-components.xcomponentbusapi.on.md)
</td><td>
</td><td>
[XBus](./x-components.xbus.md)<!-- --><[XEventsTypes](./x-components.xeventstypes.md)<!-- -->, [WireMetadata](./x-components.wiremetadata.md)<!-- -->>\['on'\]
</td><td>
Retrieves an observable for an event.
</td></tr>
</tbody></table>