interface DomainInstance {
    domain?: {
        notifyChange(): void;
    };
    notifyChange?: () => void;
}
export interface PropertyDecorator {
    <C extends DomainInstance, V>(target: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): ClassAccessorDecoratorResult<C, V>;
    <C extends DomainInstance, V>(target: (value: V) => void, context: ClassSetterDecoratorContext<C, V>): (this: C, value: V) => void;
}
type StandardPropertyContext<C, V> = ClassAccessorDecoratorContext<C, V> | ClassSetterDecoratorContext<C, V>;
type StandardPropertyTarget<C, V> = ClassAccessorDecoratorTarget<C, V> | ((value: V) => void);
export interface ObserveConfig {
    /**
     * To be used when observing an object and not a primitive.
     * It creates a proxy that observes changes in the object.
     */
    deep?: boolean;
}
/**
 * Reads the raw value of the object, that is, not proxied object.
 * @param source The source object that contains the object
 * @param target The target object set on the source object
 * @returns The not proxied object or undefined
 */
export declare function toRaw<T extends object = object>(source: object, target: T): T | undefined;
/**
 * Turns a class property or a setter into an observed property
 * that notifies the root domain when changed.
 *
 * A property has to be declared with the `accessor` type to be
 * observed.
 *
 * ```typescript
 * @observed() accessor name: string | undefined
 *
 * @observed()
 * set height(value: number) {
 *   this.#height = value
 * }
 *
 * get height(): number {
 *   return this.#height
 * }
 * ```
 *
 * The decorator can be used in the following ways:
 * - As a class property decorator
 * - As a class setter decorator
 *
 * The property class either has to have the `domain` property
 * or a `notifyChange` method. The decorator will call the
 * `notifyChange` method if it exists. Otherwise, it will
 * call the `notifyChange` method of the root domain (the `domain` property).
 */
export declare function observed(config?: ObserveConfig): PropertyDecorator;
/**
 * A decorator that can be used to retarget the change event
 * of a property to the root domain.
 *
 * This decorator should not be used with the `observed` decorator.
 * It does the same thing. It will notify about a change to the
 * property itself.
 */
export declare function retargetChange(): <C extends DomainInstance, V extends EventTarget | undefined>(target: StandardPropertyTarget<C, V>, context: StandardPropertyContext<C, V>) => any;
export {};
//# sourceMappingURL=observed.d.ts.map