UNPKG

@tmorin/ceb-messaging-builder-inversion

Version:

The package is part of the `<ceb/>` library. It provides a builder to resolve and inject a bus from a container and then subscribe to event.

33 lines (32 loc) 1.11 kB
import { Module, ModuleConfiguration } from "@tmorin/ceb-inversion-core"; /** * The options of {@link GatewayInversionBuilderModule}. */ export interface GatewayInversionBuilderModuleOptions { /** * When `true`, the current container becomes the default one, i.e. {@link GatewayInversionBuilder#setDefaultContainer} */ setDefaultContainer: boolean; } /** * The module can set the default container of {@link GatewayInversionBuilder}. * * @example Register the module * ```typescript * import {ContainerBuilder} from "@tmorin/ceb-inversion-core" * import {GatewayInversionBuilderModule} from "@tmorin/ceb-messaging-builder-inversion" * const container = ContainerBuilder.get() * .module(new GatewayInversionBuilderModule()) * .build() * ``` */ export declare class GatewayInversionBuilderModule implements Module { private readonly options; constructor( /** * Options of the module. */ partialOptions?: Partial<GatewayInversionBuilderModuleOptions>); initialize(configuration: ModuleConfiguration): Promise<void>; dispose(): Promise<void>; }