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

Function get

packages/debugger/src/inspector/inspector.ts:145–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143 // and to track when the value changes.
144 Object.defineProperty(observed.props, key, {
145 get() {
146 let value = get()
147 let listener = setup.solid.getListener()
148 if (listener != null) {
149 utils.onOwnerCleanup(listener, () => {
150 if (--o.n === 0) {
151 observed.on_prop_state_change?.(key, PropGetterState.Stale)
152 }
153 })
154 }
155 if (++o.n === 1) {
156 observed.on_prop_state_change?.(key, PropGetterState.Live)
157 }
158 if (value !== o.v) {
159 observed.on_value_update?.(id)
160 }
161 return o.v = value
162 },
163 enumerable: true,
164 })
165

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected