/** * Delegates property access of `proxy` to given `source` object. * The proxy.prototype is set to the given `source` object. * * @example * ```ts * const src = {x: 1}; * const proxy = { * y: 2 * }; * const a = delegate(src, proxy); * a === proxy // -> true * a.y // -> 2 * a.x // -> 1 * ``` * @param source the object which should be wrapped. * @returns the proxy. */ declare function delegate(source: SourceType): SourceType; /** * Delegates property access of `proxy` to given `source` object. * The proxy.prototype is set to the given `source` object. * * @example * ```ts * const src = {x: 1}; * const proxy = { * y: 2 * }; * const a = delegate(src, proxy); * a === proxy; // -> true * a.y // -> 2 * a.x // -> 1 * ``` * @param source the object which should be wrapped. * @param proxy a prepared proxy * @returns the proxy. */ declare function delegate(source: SourceType, proxy: ProxyType): SourceType & ProxyType; export { delegate as default, delegate };