UNPKG

typebus-cqrs

Version:

Simple, type-safe CQRS library with auto-registration and minimal boilerplate (typebus-cqrs)

25 lines 1.58 kB
import { TypeBus } from './core/TypeBus'; /** * Factory function for creating a configured TypeBus-CQRS instance. * @template TCommandMap - Command map type * @template TQueryMap - Query map type * @template TEventMap - Event map type * @param {Object} [config] - Optional configuration for the TypeBus-CQRS instance. * @param {boolean} [config.enableLogging] - Enable logging middleware. * @param {'info'|'debug'|'verbose'} [config.logLevel] - Logging level. * @returns {TypeBus<TCommandMap, TQueryMap, TEventMap>} TypeBus-CQRS instance */ export declare function createTypeBus<TCommandMap extends Record<string, any> = any, TQueryMap extends Record<string, any> = any, TEventMap extends Record<string, any> = any>(config?: { enableLogging?: boolean; logLevel?: 'info' | 'debug' | 'verbose'; }): TypeBus<TCommandMap, TQueryMap, TEventMap>; /** * Utility function for creating a fluent API builder for TypeBus-CQRS. * @template TCommandMap - Command map type * @template TQueryMap - Query map type * @template TEventMap - Event map type * @param {TypeBus<TCommandMap, TQueryMap, TEventMap>} bus - The TypeBus-CQRS instance. * @returns {ReturnType<typeof createFluentBuilder<TCommandMap, TQueryMap, TEventMap>>} */ export declare function fluent<TCommandMap extends Record<string, any> = any, TQueryMap extends Record<string, any> = any, TEventMap extends Record<string, any> = any>(bus: TypeBus<TCommandMap, TQueryMap, TEventMap>): import("./builders/TypedBuilders").FluentBuilder<TCommandMap, TQueryMap, TEventMap>; //# sourceMappingURL=factory.d.ts.map