createChangeProxy

Function: createChangeProxy()

ts
function createChangeProxy<T>(target, parent?): object
function createChangeProxy<T>(target, parent?): object

Defined in: packages/db/src/proxy.ts:273

Creates a proxy that tracks changes to the target object

Type Parameters

T extends Record<string | symbol, any>

Parameters

target

T

The object to proxy

parent?

Optional parent information

prop

string | symbol

tracker

ChangeTracker<Record<string | symbol, unknown>>

Returns

object

An object containing the proxy and a function to get the changes

getChanges()

ts
getChanges: () => Record<string | symbol, any>;
getChanges: () => Record<string | symbol, any>;

Returns

Record<string | symbol, any>

proxy

ts
proxy: T;
proxy: T;
Our Partners
Electric
Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.