Readonly __unimock_Current wrapping depth (0 = top-level). Used for SnapshotStore.depth.
Readonly __unimock_Unique reference identifier used in snapshot call keys (call:{refId}:...).
Private Readonly storePrivate Readonly targetPrivate #recordRecord-mode property access. Function properties become wrapper functions
that call the real target, record the call:{refId}: entry and wrap the result via
wrapNested; plain properties are recorded as prop: entries and returned as-is.
Private #replayReplay-mode property access. Property entries (recorded prop: keys) win
over method calls; otherwise a callable is returned that looks the call:{refId}: key
up in the snapshot store. next gets iterator-sequence semantics.
Description
Proxy wrapper for objects returned by mocked methods.
In record mode, every property access (method call) on the wrapped object is forwarded to the real target and the call is recorded into the snapshot store with key
call:{refId}:{method}:{hash}.In replay mode, the proxy returns a function that looks up the recorded entry in the snapshot store and returns the deserialised result (or another MockHandler for nested objects).
Features:
store.depthlevels deep.then,constructor, and#-prefixed properties are forwarded to avoid breaking thenable detection and private field access.