import { Evented } from "@arcgis/core/core/Evented.js";
import type { AfterItemChangeEvent } from "./collection.js";
/**
 * Raised when items are added or removed from an {@link ObservableMap}.
 */
export interface MapChangeEvent<K, V> {
    /**
     * The items that were added.
     */
    added: [K, V][];
    /**
     * The items that were removed.
     */
    removed: [K, V][];
    /**
     * The {@link ObservableMap} that raised the event.
     */
    target: ObservableMap<K, V>;
}
/**
 * Raised after an item is added or removed from an {@link ObservableMap}.
 */
export interface MapAfterItemEvent<K, V> extends AfterItemChangeEvent<ObservableMap<K, V>, [K, V]> {
}
/**
 * A type that maps event names to their corresponding event object types for an
 * {@link ObservableMap}.
 */
export interface MapEvents<K, V> {
    /**
     * Fires after an item has been Added or removed from the Map. From the
     * Collection.
     */
    change: MapChangeEvent<K, V>;
    /**
     * Fires after an item has been added to the Map.
     */
    "after-add": MapAfterItemEvent<K, V>;
    /**
     * Fires after an item has been removed from the Map.
     */
    "after-remove": MapAfterItemEvent<K, V>;
}
declare const ObservableMap_base: typeof Evented & (abstract new (...args: any[]) => import("../support/observableUtils.js").ObservableMixin);
/**
 * A Map that supports observability.
 */
export declare class ObservableMap<K, V> extends ObservableMap_base implements Map<K, V> {
    /**
     * @deprecated Do not directly reference this property. Use EventNames and
     *   EventTypes helpers from @arcgis/core/Evented.
     */
    "@eventTypes": MapEvents<K, V>;
    /**
     * Used by Object.toString().
     */
    readonly [Symbol.toStringTag] = "ObservableMap";
    /**
     * The number of elements.
     */
    get size(): number;
    /**
     * The underlying map that this object is delegating to.
     */
    protected _originalMap: Map<K, V> | ObservableMap<K, V>;
    constructor();
    /**
     * Removes all elements.
     */
    clear(): void;
    /**
     * Removes the specified element.
     *
     * @param key The element's key.
     * @returns True if an element was deleted, otherwise false.
     */
    delete(key: K): boolean;
    /**
     * Executes a provided function once per each key/value pair in the map.
     *
     * @param callbackfn Function to execute for each element.
     * @param thisArg Value to use as `this` when executing callback.
     */
    forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: unknown): void;
    get(key: K): V | undefined;
    /**
     * Indicates whether or not an element with the specified key exists.
     *
     * @param key The key to test for.
     */
    has(key: K): boolean;
    set(key: K, value: V): this;
    /**
     * Returns the `[key, value]` pairs for each element in the map in insertion
     * order.
     */
    entries(): MapIterator<[K, V]>;
    /**
     * Returns the keys for each element in the map in insertion order.
     */
    keys(): MapIterator<K>;
    /**
     * Returns the values for each element in the map in insertion order.
     */
    values(): MapIterator<V>;
    /**
     * Returns the `[key, value]` pairs for each element in the map in insertion
     * order.
     */
    [Symbol.iterator](): MapIterator<[K, V]>;
    /**
     * Returns a serializable representation of the map.
     */
    toJSON(): unknown;
}
export {};
