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

Function getProxiedElement

packages/db/src/proxy.ts:99–114  ·  view source on GitHub ↗
(element: unknown, index: number)

Source from the content-addressed store, hash-verified

97
98 // Create a helper to get proxied version of an array element
99 const getProxiedElement = (element: unknown, index: number): unknown => {
100 if (isProxiableObject(element)) {
101 const nestedParent = {
102 tracker: changeTracker as unknown as ChangeTracker<
103 Record<string | symbol, unknown>
104 >,
105 prop: String(index),
106 }
107 const { proxy: elementProxy } = memoizedCreateChangeProxy(
108 element,
109 nestedParent,
110 )
111 return elementProxy
112 }
113 return element
114 }
115
116 // Wrap the callback to pass proxied elements
117 const wrappedCallback = function (

Callers 3

wrappedCallbackFunction · 0.85
reduceCallbackFunction · 0.85

Calls 2

isProxiableObjectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…