Type Alias EventBusSettingsBase<TEventMap>

EventBusSettingsBase: {
    eventMapSchema?: EventMapSchema<TEventMap>;
    lazyPromiseFactory?: Factory<AsyncLazy<any>, LazyPromise<any>>;
    namespace?: Namespace;
    shouldValidateOutput?: boolean;
}

IMPORT_PATH: "@daiso-tech/core/event-bus"

Type Parameters

Type declaration

  • OptionaleventMapSchema?: EventMapSchema<TEventMap>

    You can provide any standard schema compliant object to validate all input and output data to ensure runtime type safety.

  • OptionallazyPromiseFactory?: Factory<AsyncLazy<any>, LazyPromise<any>>

    You can pass a Factory of LazyPromise to configure default settings for all LazyPromise instances used in the EventBus class.

    import { LazyPromise } from "@daiso-tech/core/async";

    (invokable) => new LazyPromise(invokable)
  • Optionalnamespace?: Namespace
    import { Namespace } from "@daiso-tech/core/utilities";

    new Namespace(["@", "event-bus"])
  • OptionalshouldValidateOutput?: boolean

    You can enable validating events in listeners.

    true