MCPcopy Index your code
hub / github.com/TanStack/db / defineProperty

Function defineProperty

packages/db/src/proxy.ts:997–1007  ·  view source on GitHub ↗
(ptarget, prop, descriptor)

Source from the content-addressed store, hash-verified

995 },
996
997 defineProperty(ptarget, prop, descriptor) {
998 // Forward the defineProperty to the target to maintain Proxy invariants
999 // This allows Object.seal() and Object.freeze() to work on the proxy
1000 const result = Reflect.defineProperty(ptarget, prop, descriptor)
1001 if (result && `value` in descriptor) {
1002 changeTracker.copy_[prop as keyof T] = deepClone(descriptor.value)
1003 changeTracker.assigned_[prop.toString()] = true
1004 markChanged(changeTracker)
1005 }
1006 return result
1007 },
1008
1009 getOwnPropertyDescriptor(ptarget, prop) {
1010 // Forward to target to maintain Proxy invariants for seal/freeze

Callers

nothing calls this directly

Calls 3

deepCloneFunction · 0.85
markChangedFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…