@empathyco/x-components
Version:
Empathy X Components
16 lines (9 loc) • 861 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [Wire](./x-components.wire.md)
## Wire type
A Wire is a function that receives an observable, the store and the on function of the bus it will run in and returns a subscription.
**Signature:**
```typescript
export type Wire<PayloadType> = (observable: Observable<WirePayload<PayloadType>>, store: Store<RootXStoreState>, on: XPriorityBus<XEventsTypes, WireMetadata>['on']) => Subscription;
```
**References:** [WirePayload](./x-components.wirepayload.md)<!-- -->, [RootXStoreState](./x-components.rootxstorestate.md)<!-- -->, [XPriorityBus](./x-components.xprioritybus.md)<!-- -->, [XEventsTypes](./x-components.xeventstypes.md)<!-- -->, [WireMetadata](./x-components.wiremetadata.md)