UNPKG

@empathyco/x-components

Version:
78 lines (35 loc) 1.53 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 <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)<!-- -->&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) </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)<!-- -->&lt;[XEventsTypes](./x-components.xeventstypes.md)<!-- -->, [WireMetadata](./x-components.wiremetadata.md)<!-- -->&gt;\['on'\] </td><td> Retrieves an observable for an event. </td></tr> </tbody></table>