import type { Constructor } from '@cratis/fundamentals'; import type { BatchMethod } from './BatchMethod.js'; /** * Discovers the batch methods of an observer: the methods decorated with `@observes`. * @param observerType - The observer class. * @param registeredTypes - The event types registered with the event store. * @param methods - The instance methods of the observer. * @returns The {@link BatchMethod} instances. * @throws {@link InvalidBatchMethod} when a batch method also declares a per-event decorator or observes an unregistered type. * @throws {@link EventTypeObservedByMoreThanOneMethod} when two batch methods observe the same event type. */ export declare function getBatchMethods(observerType: Constructor, registeredTypes: readonly Constructor[], methods?: ReadonlyMap): BatchMethod[]; /** * Gets the instance methods of an observer that are not batch methods, for per-event discovery. * @param methods - The instance methods. * @param batchMethods - The batch methods. * @returns The methods without the batch methods. */ export declare function withoutBatchMethods(methods: ReadonlyMap, batchMethods: readonly BatchMethod[]): Map; /** * Throws when an event type observed by a batch method is also handled by a per-event method. * @param observerType - The observer class. * @param batchMethods - The batch methods. * @param handlers - The per-event handlers, each with the event type identifier and the methods it reaches. * @throws {@link EventTypeObservedByMoreThanOneMethod} when an event type reaches both. */ export declare function assertEachEventTypeReachesOneMethod(observerType: Constructor, batchMethods: readonly BatchMethod[], handlers: readonly { readonly id: string; readonly methodNames: readonly string[]; }[]): void; //# sourceMappingURL=BatchMethods.d.ts.map