isLiveQueryInstance
isLiveQueryInstance(
value):value is LiveQuery<any>
Defined in: packages/@livestore/livestore/src/store/store-types.ts:384
Type guard that checks if a value is a live query instance.
Live query instances are stateful objects bound to a Store’s reactivity graph.
They’re created internally when you use a definition with store.query() or store.subscribe().
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”value is LiveQuery<any>
Example
Section titled “Example”const [, , , query$] = useClientDocument(tables.uiState)
if (isLiveQueryInstance(query$)) { console.log('Execution count:', query$.runs)}