/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /** * The fulfilled value of a promise, or the original type for a synchronous result. * @internal */ export type UnPromise = T extends Promise ? U : T; /** * Produce a replacement property with access to the real object's methods and state. * @internal */ export type OverrideFactory = (T: T) => T[P]; /** * Overrides either replace a property or recursively wrap a method's eventual return value. * @internal */ export type NestedOverrides = { [P in keyof T]?: T[P] extends (...args: any) => any ? NestedOverrides>> | OverrideFactory : OverrideFactory; }; /** * Control the receiver of unoverridden members while sharing the same deep-override mechanism. * @internal */ export interface IWrapObjectAndOverrideOptions { /** * By default, getters and ordinary method calls use the proxy, so sibling calls see overrides. * Opt into "target" to evaluate getters and bind methods to their original owner, including private state. * Nested return-value wrappers inherit this setting; explicitly overridden calls keep their existing behavior. * @defaultValue "proxy" */ receiver?: "proxy" | "target"; } /** * Wrap an object or deeply nested service call results without changing the original object. * Proxy-receiver dispatch is preserved by default so existing fault-injection tests can intercept sibling calls. * Observational wrappers may explicitly opt into original-target receivers for driver/private-field fidelity. * Used by storage fault-injection tests and inspectable storage upload observers. * @internal */ export declare function wrapObjectAndOverride>(obj: T, overrides: NestedOverrides, options?: IWrapObjectAndOverrideOptions): T; //# sourceMappingURL=mocking.d.ts.map