Type Alias EventBusSettingsBase<TEventMap>

EventBusSettingsBase: {
    eventMapSchema?: EventMapSchema<TEventMap>;
    executionContext?: IExecutionContext;
    namespace?: INamespace;
    shouldValidateOutput?: boolean;
}

Base configuration shared by all EventBus variants. Supports optional schema-based validation for event maps.

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.

  • OptionalexecutionContext?: IExecutionContext

    You can pass IExecutionContext that will be used by context-aware adapters.

    import { ExecutionContext } from "@daiso-tech/core/execution-context"
    import { NoOpExecutionContextAdapter } from "@daiso-tech/core/execution-context/no-op-execution-context-adapter"

    new ExecutionContext(new NoOpExecutionContextAdapter())
  • Optionalnamespace?: INamespace
    import { NoOpNamespace } from "@daiso-tech/core/namespace";

    new NoOpNamespace()
  • OptionalshouldValidateOutput?: boolean

    You can enable validating events in listeners.

    true