UNPKG

@daiso-tech/core

Version:

The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.

41 lines (40 loc) 1.43 kB
/** * @module EventBus */ import type { ISerderRegister, ISerializable } from "../../serde/contracts/_module-exports.js"; import { type ISerializedError, type OneOrMore } from "../../utilities/_module-exports.js"; /** * * IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"` * @group Errors */ export declare class EventBusError extends Error implements ISerializable<ISerializedError> { static deserialize(deserializedValue: ISerializedError): EventBusError; constructor(message: string, cause?: unknown); serialize(): ISerializedError; } /** * * IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"` * @group Errors */ export declare class UnexpectedEventBusError extends EventBusError { static deserialize(deserializedValue: ISerializedError): EventBusError; constructor(message: string, cause?: unknown); } /** * * IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"` * @group Errors */ export declare const EVENT_BUS_ERRORS: { Base: typeof EventBusError; Unexpected: typeof UnexpectedEventBusError; }; /** * The `registerEventBusErrorsToSerde` function registers all {@link IEventBus | `IEventBus`} related errors with `ISerderRegister`, ensuring they will properly be serialized and deserialized. * * IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"` * @group Errors */ export declare function registerEventBusErrorsToSerde(serde: OneOrMore<ISerderRegister>): void;