import '../../globals.js';
import TinyEmitter, { TinyEmitterOptions } from './TinyEmitter.js';
import type TProperty from './TProperty.js';
import type TReadOnlyProperty from './TReadOnlyProperty.js';
import type { PropertyLazyLinkListener, PropertyLinkListener, PropertyListener } from './TReadOnlyProperty.js';
import { ValueComparisonStrategy } from './Validation.js';
export type TinyPropertyEmitterParameters<T> = [T, T | null, TReadOnlyProperty<T>];
export type TinyPropertyOnBeforeNotify<T> = (...args: TinyPropertyEmitterParameters<T>) => void;
type OptionsAlias<T> = TinyEmitterOptions<TinyPropertyEmitterParameters<T>>;
export default class TinyProperty<T> extends TinyEmitter<TinyPropertyEmitterParameters<T>> implements TProperty<T> {
    _value: T;
    _valueComparisonStrategy?: ValueComparisonStrategy<T>;
    constructor(value: T, onBeforeNotify?: OptionsAlias<T>['onBeforeNotify'] | null, hasListenerOrderDependencies?: OptionsAlias<T>['hasListenerOrderDependencies'] | null, reentrantNotificationStrategy?: OptionsAlias<T>['reentrantNotificationStrategy'] | null);
    /**
     * Returns the value.
     *
     * You can also use the es5 getter (property.value) but this means is provided for inner loops
     * or internal code that must be fast.
     */
    get(): T;
    /**
     * Returns the value.
     */
    get value(): T;
    /**
     * Sets the value.
     */
    set value(newValue: T);
    /**
     * Sets the value and notifies listeners, unless deferred or disposed. You can also use the es5 getter
     * (property.value) but this means is provided for inner loops or internal code that must be fast. If the value
     * hasn't changed, this is a no-op.
     */
    set(value: T): void;
    /**
     * Sets the value without notifying any listeners. This is a place to override if a subtype performs additional work
     * when setting the value.
     */
    setPropertyValue(value: T): void;
    /**
     * Returns true if and only if the specified value equals the value of this property. This is used to determine if
     * a Property's value should change and if listeners should be notified. In general, this implementation should
     * not be overridden except to provide more correct "value"s as parameters for the areValuesEqual() function.
     */
    protected equalsValue(value: T): boolean;
    /**
     * Central logic for determining value equality for Property. This determines if a value should change, and if
     * listeners should notify based on set() call.
     *
     * Determines equality semantics for value comparison, including whether notifications are sent out when the
     * wrapped value changes, and whether onValue() is triggered. See Validation.equalsForValidationStrategy for details
     * and doc on ValueComparisonStrategy
     *
     * Overriding this function is deprecated, instead provide a custom valueComparisonStrategy.
     */
    areValuesEqual(a: T, b: T): boolean;
    /**
     * Directly notifies listeners of changes.
     */
    notifyListeners(oldValue: T): void;
    /**
     * Adds listener and calls it immediately. If listener is already registered, this is a no-op. The initial
     * notification provides the current value for newValue and null for oldValue.
     */
    link(listener: PropertyLinkListener<T>): void;
    /**
     * Add an listener to the TinyProperty, without calling it back right away. This is used when you need to register a
     * listener without an immediate callback.
     */
    lazyLink(listener: PropertyLazyLinkListener<T>): void;
    /**
     * Removes a listener. If listener is not registered, this is a no-op.
     */
    unlink(listener: PropertyListener<T>): void;
    /**
     * Removes all listeners. If no listeners are registered, this is a no-op.
     */
    unlinkAll(): void;
    /**
     * Links an object's named attribute to this TinyProperty.  Returns a handle so it can be removed using
     * TinyProperty.unlink();
     * Example: modelVisibleProperty.linkAttribute(view, 'visible');
     *
     * NOTE: Duplicated with Property.linkAttribute
     */
    linkAttribute<Attr extends string>(object: Record<Attr, T>, attributeName: Attr): (value: T) => void;
    /**
     * Returns true if the value can be set externally, using .value= or set()
     */
    isSettable(): boolean;
    get valueComparisonStrategy(): ValueComparisonStrategy<T>;
    set valueComparisonStrategy(valueComparisonStrategy: ValueComparisonStrategy<T>);
    /**
     * Releases references.
     */
    dispose(): void;
}
export {};
//# sourceMappingURL=TinyProperty.d.ts.map