import { EventHook, ObjKey, RecordedRead } from "../common"; import { WatchedProxyHandler } from "../watchedProxyFacade"; import { RecordedReadOnProxiedObjectExt } from "../RecordedReadOnProxiedObjectExt"; import { DualUseTracker, ForWatchedProxyHandler, IWatchedProxyHandler_common } from "../proxyFacade"; /** * Hooks for one map. * Note for specificity: There will be only one of the **change** events fired. The Recorded...Read.onChange handler will add the listeners to all possible candidates. It's this way around. * {@link ObjectChangeHooks} are also subscribed on Maps */ declare class MapChangeHooks { specificKeyAddedOrRemoved: import("../Util").DefaultMap; anyKeyAddedOrRemoved: EventHook; specificValueChanged: import("../Util").DefaultMap; anyValueChanged: EventHook; } export declare const changeHooksForMap: WeakMap, MapChangeHooks>; export declare function getChangeHooksForMap(map: Map): MapChangeHooks; /** * Can be either used as a supervisor-class in a WatchedProxyHandler, or installed on the non-proxied object via Object.setPrototypeOf * The "this" may be different in these cases. */ export declare class MapChangeTracker extends Map implements DualUseTracker> { get _watchedProxyHandler(): IWatchedProxyHandler_common | undefined; protected _withUnspecificChange(changeFn: () => R): R; /** * Will return the original object when this class is used as supervisor class in the WatchedProxyHandler */ get _target(): Map; /** * Pretend that this is a Map */ get ["constructor"](): MapConstructor; set(key: K, value: V): this; delete(key: K): boolean; clear(): any; } export declare class RecordedMap_get extends RecordedReadOnProxiedObjectExt { key: unknown; keyExists: boolean; /** * Result of the .get call */ value: unknown; origObj: Map; constructor(key: unknown, keyExists: boolean, value: unknown); get isChanged(): boolean; getAffectingChangeHooks(target: this["origObj"]): EventHook[]; equals(other: RecordedRead): boolean; } export declare class RecordedMap_has extends RecordedReadOnProxiedObjectExt { key: unknown; /** * Result of the .has call */ keyExists: boolean; origObj: Map; constructor(key: unknown, keyExists: boolean); get isChanged(): boolean; getAffectingChangeHooks(target: this["origObj"]): EventHook[]; equals(other: RecordedRead): boolean; } export declare class RecordedMapKeysRead extends RecordedReadOnProxiedObjectExt { keys: Array; origObj: Map; constructor(keys: Array); getAffectingChangeHooks(target: this["origObj"]): EventHook[]; equals(other: RecordedRead): boolean; get isChanged(): boolean; } export declare class RecordedMapValuesRead extends RecordedReadOnProxiedObjectExt { values: Array; origObj: Map; constructor(values: Array); getAffectingChangeHooks(target: this["origObj"]): EventHook[]; equals(other: RecordedRead): boolean; get isChanged(): boolean; } export declare class RecordedMapEntriesRead extends RecordedReadOnProxiedObjectExt { values: Array<[unknown, unknown]>; origObj: Map; constructor(values: Array<[unknown, unknown]>); getAffectingChangeHooks(target: this["origObj"]): EventHook[]; equals(other: RecordedRead): boolean; get isChanged(): boolean; } export declare class MapReadTracker extends Map implements ForWatchedProxyHandler> { get _watchedProxyHandler(): WatchedProxyHandler; get _target(): Map; protected _fireAfterEntriesRead(): void; /** * Pretend that this is a Map */ get ["constructor"](): MapConstructor; get(key: K): V | undefined; has(key: K): boolean; values(): MapIterator; entries(): MapIterator<[K, V]>; keys(): MapIterator; forEach(callbackfn: (value: V, key: K, map: Map, ...restOfArgs: unknown[]) => void, ...restOfArgs: unknown[]): void; [Symbol.iterator](): MapIterator<[K, V]>; get size(): number; } export declare const config: { clazz: MapConstructor; readTracker: typeof MapReadTracker; changeTracker: typeof MapChangeTracker; /** * Built-in Methods, which are using fields / calling methods on the proxy transparently/loyally, so those methods don't call/use internal stuff directly. * Tested with, see dev_generateEsRuntimeBehaviourCheckerCode.ts * May include read-only / reader methods */ knownHighLevelMethods: Set; /** * Non-high level */ readOnlyMethods: Set; /** * Non-high level */ readOnlyFields: Set; receiverMustBeNonProxied: boolean; worksForSubclasses: boolean; trackTreads: boolean; trackSettingObjectProperties: boolean; proxyUnhandledMethodResults: boolean; getTrackerClasses(): import("../common").Clazz[]; }; export {}; //# sourceMappingURL=Map.d.ts.map