UNPKG

@empathyco/x-components

Version:
22 lines (13 loc) 1.31 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [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)<!-- -->&lt;[XEventsTypes](./x-components.xeventstypes.md)<!-- -->, void&gt;) =&gt; void) &amp; (&lt;Event extends [XEvent](./x-components.xevent.md)<!-- -->&gt;(event: Event, payload: [XEventPayload](./x-components.xeventpayload.md)<!-- -->&lt;Event&gt;, metadata?: Omit&lt;[WireMetadata](./x-components.wiremetadata.md)<!-- -->, 'moduleName' \| 'origin' \| 'location'&gt;) =&gt; void) | Emits an event with the <code>void</code> type associated as payload. | | [on](./x-components.xcomponentbusapi.on.md) | | [XBus](./x-components.xbus.md)<!-- -->&lt;[XEventsTypes](./x-components.xeventstypes.md)<!-- -->, [WireMetadata](./x-components.wiremetadata.md)<!-- -->&gt;\['on'\] | Retrieves an observable for an event. |