@empathyco/x-components
Version:
Empathy X Components
14 lines (8 loc) • 690 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [XBus](./x-components.xbus.md) > [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>>);
```