MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / updateProxyProps

Function updateProxyProps

packages/frontend/src/inspector.tsx:85–103  ·  view source on GitHub ↗

* Props — add/remove changed prop keys of an proxy object

({
    added,
    removed,
}: debug.InspectorUpdateMap['propKeys'])

Source from the content-addressed store, hash-verified

83 * Props — add/remove changed prop keys of an proxy object
84 */
85function updateProxyProps({
86 added,
87 removed,
88}: debug.InspectorUpdateMap['propKeys']): Parameters<s.Setter<Inspector.State['props']>>[0] {
89 return previous => {
90 if (!previous) return null
91
92 const record = {...previous.record}
93 for (const key of added)
94 record[key] = createPropItem(
95 key,
96 {type: debug.ValueType.Unknown},
97 debug.PropGetterState.Stale,
98 )
99 for (const key of removed) delete record[key]
100
101 return {record, proxy: true}
102 }
103}
104
105function updateStore(
106 [storeProperty, newRawValue]: debug.InspectorUpdateMap['store'],

Callers 1

createInspectorFunction · 0.85

Calls 1

createPropItemFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…