import 'reflect-metadata'; import { ChronicleClassOrPropertyDecorator } from '../../types/propertyDecoratorMetadata.js'; /** Metadata stored by the removedWith class or property decorator. */ export interface RemovedWithMetadata { /** The event constructor that triggers removal. */ readonly eventType: Function; /** The event property name that identifies the instance to remove. Defaults to the event source identifier. */ readonly key?: string; /** The event property name that identifies the parent instance (for children). Defaults to the event source identifier. */ readonly parentKey?: string; } /** * Class or property decorator that specifies the event type that removes a read model instance or child. * When used on a class, it removes the read model instance. * When used on a property, it removes a child from the collection. * @param eventType - The event constructor. * @param key - Optional event property name used as the key to identify the instance to remove. * @param parentKey - Optional event property name used as the parent key (for children only). * @returns A class and property decorator. */ export declare function removedWith(eventType: Function, key?: string, parentKey?: string): ChronicleClassOrPropertyDecorator; /** * Retrieves removedWith metadata stored on the given class constructor. * @param target - The class constructor. * @returns An array of removedWith metadata entries. */ export declare function getRemovedWithClassMetadata(target: Function): RemovedWithMetadata[]; /** * Retrieves removedWith metadata stored on the given property. * @param target - The class prototype. * @param propertyKey - The property name. * @returns An array of removedWith metadata entries. */ export declare function getRemovedWithPropertyMetadata(target: object, propertyKey: string): RemovedWithMetadata[]; //# sourceMappingURL=removedWith.d.ts.map