UNPKG

@empathyco/x-components

Version:
14 lines (8 loc) 690 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [XBus](./x-components.xbus.md) &gt; [emit](./x-components.xbus.emit.md) ## XBus.emit property Emits an event with the `void` type associated as payload. **Signature:** ```typescript emit: (<SomeEvent extends keyof SomeEvents>(event: SomeEvent) => Promise<EmittedData<SomeEvents, SomeEvent, SomeEventMetadata>>) | (<SomeEvent extends keyof SomeEvents>(event: SomeEvent, payload: EventPayload<SomeEvents, SomeEvent>, metadata?: SomeEventMetadata) => Promise<EmittedData<SomeEvents, SomeEvent, SomeEventMetadata>>); ```