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

Function getOwnerStore

packages/debugger/src/inspector/store.test.ts:12–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10import {type OnNodeUpdate, type StoreNodeProperty, observeStoreNode, setOnStoreNodeUpdate} from './store.ts'
11
12const getOwnerStore = () => {
13 const owner = setup.solid.getOwner()
14 if (!owner) throw new Error('No owner')
15 if (!owner.sourceMap) throw new Error('No sourceMap')
16 const store = owner.sourceMap.find(isSolidStore)
17 if (!store) throw new Error('No store')
18 return store.value
19}
20
21const getNodeProp = (node: Solid.StoreNode, prop: string): StoreNodeProperty =>
22 `${getSdtId(unwrap(node), ObjectType.StoreNode)}:${prop}`

Callers 1

store.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…