UNPKG

@empathyco/x-components

Version:
14 lines 1.05 kB
/** * Function which returns the `$x` object from the current component instance. * * @returns The `$x` object from the current component instance. * * @public */ export declare function use$x(): import("./use-alias-api").UseAliasAPI & { on: <Event_1 extends keyof import("..").XEventsTypes, Metadata extends boolean>(event: Event_1, withMetadata: Metadata) => { subscribe: (callback: (payload: Metadata extends true ? import("@empathyco/x-bus").SubjectPayload<import("@empathyco/x-bus").EventPayload<import("..").XEventsTypes, Event_1>, import("..").WireMetadata> : import("@empathyco/x-bus").EventPayload<import("..").XEventsTypes, Event_1>) => void) => void; }; emit: <Event_2 extends keyof import("..").XEventsTypes>(event: Event_2, payload?: import("..").XEventPayload<Event_2> | undefined, metadata?: Omit<import("..").WireMetadata, "moduleName">) => Promise<import("@empathyco/x-bus").EmittedData<import("..").XEventsTypes, Event_2, import("..").WireMetadata>>; }; //# sourceMappingURL=use-$x.d.ts.map