/** * Envoy is a ProxyHandler implementation designed to proxy an object * and all its subproperties. Envoy automatically creates new Proxies * when it encounters un-proxied objects in the root object hierarchy. * * @internal */ export declare abstract class Envoy { /** * Create the root Proxy object. * * @param obj - Optional. Any additional arguments. * * @returns A new object Proxy. * * @virtual Override if the constructor is also overridden. */ static create(obj: {} | unknown[]): {} | unknown[]; /** * Check whether a value is an object. * * @param obj - Value to test. * * @returns A boolean indicating whether obj is an object. */ protected static _isObject(obj: unknown): obj is object; /** * ProxyHandler.get implementation. * * @param obj - Proxied object. * @param prop - The name of the property to get. * * @returns The value of `prop` on `obj`. * * @remarks Returns true if prop is `__isProxy__`. */ get(obj: {} | unknown[], prop: string): T | undefined; /** * ProxyHandler.set implementation. * * @param obj - Proxied object. * @param prop - Property name. * @param val - Value to set. * * @returns A value indicating whether the property was set. */ set(obj: {} | unknown[], prop: string, val: T): boolean; /** * Invoked when retrieving any value from the proxied * object. * * @param prop - Property name. * @param val - Property value. * * @returns The value to return from the proxy. * * @remarks onGetValue is not called when checking the * `__isProxy__` property. * * @virtual */ onGetValue(prop: string, val: T): T; /** * Invoked when a new Envoy Proxy needs to be created. * * @param prop - Property name for val on the parent object. * @param val - Object to proxy. * * @returns A new proxied object. * * @virtual Override if the constructor is also overridden. */ onNewEnvoy(prop: string, val: T): {}; /** * Invoked before setting any value on the proxied * object. * * @param prop - Property name. * @param val - Property value. * * @returns The value to set on the proxy. * * @virtual */ onBeforeSetValue(prop: string, val: T): T; /** * Invoked after a property is set on the proxied object. * * @param prop - Property name. * @param val - Property value. * * @virtual */ onSetValue(prop: string, val: T): void; /** * @virtual */ protected constructor(); } //# sourceMappingURL=Envoy.d.ts.map