import { AbstractModule, RegistryKey } from "@tmorin/ceb-inversion-core"; /** * The options of {@link ElectronModule}. */ export interface ElectronModuleOptions { /** * The {@link RegistryKey} of the new {@link IpcMainGateway} or {@link IpcRendererGateway} instances. * By default {@link GatewaySymbol}. */ ipcGatewayRegistryKey: RegistryKey; /** * The {@link RegistryKey} of an existing {@link EventBus} instance. * By default {@link EventBusSymbol}. */ eventsRegistryKey: RegistryKey; /** * The {@link RegistryKey} of an existing {@link CommandBus} instance. * By default {@link CommandBusSymbol}. */ commandsRegistryKey: RegistryKey; /** * The {@link RegistryKey} of an existing {@link QueryBus} instance. * By default {@link QueryBusSymbol}. */ queriesRegistryKey: RegistryKey; /** * The {@link RegistryKey} of an existing {@link EmittableGateway} instance. * By default {@link GatewayEmitterSymbol}. */ emitterRegistryKey: RegistryKey; /** * When `true`, the `error` internal events (i.e. `bus.on("error", ...)`) are displayed using `console.error(...)`. * By default `false`. */ errorToConsole: boolean; } /** * The module registers a {@link IpcMainGateway} or a {@link IpcRendererGateway} bound with the key {@link GatewaySymbol}. * * @example Register the module * ```typescript * import {ContainerBuilder} from "@tmorin/ceb-inversion-core" * import {SimpleGatewaySymbol} from "@tmorin/ceb-messaging-simple" * import {SimpleModule} from "@tmorin/ceb-messaging-simple-inversion" * import {ElectronModule} from "@tmorin/ceb-messaging-adapter-electron" * const container = ContainerBuilder.get() * .module(new SimpleModule({gatewayRegistryKey: SimpleGatewaySymbol})) * .module(new ElectronModule()) * .build() * ``` */ export declare class ElectronModule extends AbstractModule { private readonly options; /** * @param partialOptions Options of the module. */ constructor(partialOptions?: Partial); configure(): Promise; }