@livestore/livestore 0.3.0-dev.11 → 0.3.0-dev.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/SynchronousDatabaseWrapper.d.ts +5 -14
  3. package/dist/SynchronousDatabaseWrapper.d.ts.map +1 -1
  4. package/dist/SynchronousDatabaseWrapper.js +4 -24
  5. package/dist/SynchronousDatabaseWrapper.js.map +1 -1
  6. package/dist/effect/LiveStore.d.ts +8 -12
  7. package/dist/effect/LiveStore.d.ts.map +1 -1
  8. package/dist/effect/LiveStore.js +3 -13
  9. package/dist/effect/LiveStore.js.map +1 -1
  10. package/dist/index.d.ts +7 -6
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +4 -4
  13. package/dist/index.js.map +1 -1
  14. package/dist/live-queries/base-class.d.ts +21 -64
  15. package/dist/live-queries/base-class.d.ts.map +1 -1
  16. package/dist/live-queries/base-class.js +13 -56
  17. package/dist/live-queries/base-class.js.map +1 -1
  18. package/dist/live-queries/computed.d.ts +7 -7
  19. package/dist/live-queries/computed.d.ts.map +1 -1
  20. package/dist/live-queries/computed.js +11 -35
  21. package/dist/live-queries/computed.js.map +1 -1
  22. package/dist/live-queries/db.d.ts +15 -12
  23. package/dist/live-queries/db.d.ts.map +1 -1
  24. package/dist/live-queries/db.js +25 -44
  25. package/dist/live-queries/db.js.map +1 -1
  26. package/dist/live-queries/db.test.js +14 -16
  27. package/dist/live-queries/db.test.js.map +1 -1
  28. package/dist/live-queries/graphql.d.ts +8 -8
  29. package/dist/live-queries/graphql.d.ts.map +1 -1
  30. package/dist/live-queries/graphql.js +9 -35
  31. package/dist/live-queries/graphql.js.map +1 -1
  32. package/dist/reactive.d.ts +13 -15
  33. package/dist/reactive.d.ts.map +1 -1
  34. package/dist/reactive.js +9 -15
  35. package/dist/reactive.js.map +1 -1
  36. package/dist/row-query-utils.d.ts +4 -4
  37. package/dist/row-query-utils.d.ts.map +1 -1
  38. package/dist/row-query-utils.js +10 -14
  39. package/dist/row-query-utils.js.map +1 -1
  40. package/dist/store/create-store.d.ts +4 -3
  41. package/dist/store/create-store.d.ts.map +1 -1
  42. package/dist/store/create-store.js +7 -7
  43. package/dist/store/create-store.js.map +1 -1
  44. package/dist/store/devtools.d.ts +2 -2
  45. package/dist/store/devtools.d.ts.map +1 -1
  46. package/dist/store/devtools.js +15 -15
  47. package/dist/store/devtools.js.map +1 -1
  48. package/dist/store/store-types.d.ts +5 -10
  49. package/dist/store/store-types.d.ts.map +1 -1
  50. package/dist/store/store-types.js.map +1 -1
  51. package/dist/store/store.d.ts +16 -34
  52. package/dist/store/store.d.ts.map +1 -1
  53. package/dist/store/store.js +77 -129
  54. package/dist/store/store.js.map +1 -1
  55. package/dist/utils/stack-info.d.ts.map +1 -1
  56. package/dist/utils/stack-info.js +1 -6
  57. package/dist/utils/stack-info.js.map +1 -1
  58. package/dist/utils/stack-info.test.js +1 -54
  59. package/dist/utils/stack-info.test.js.map +1 -1
  60. package/dist/utils/tests/fixture.d.ts +6 -2
  61. package/dist/utils/tests/fixture.d.ts.map +1 -1
  62. package/dist/utils/tests/fixture.js +5 -3
  63. package/dist/utils/tests/fixture.js.map +1 -1
  64. package/dist/utils/tests/mod.d.ts +0 -1
  65. package/dist/utils/tests/mod.d.ts.map +1 -1
  66. package/dist/utils/tests/mod.js +0 -1
  67. package/dist/utils/tests/mod.js.map +1 -1
  68. package/package.json +12 -12
  69. package/src/{SqliteDbWrapper.ts → SynchronousDatabaseWrapper.ts} +11 -41
  70. package/src/effect/LiveStore.ts +15 -26
  71. package/src/global-state.ts +20 -0
  72. package/src/index.ts +7 -14
  73. package/src/live-queries/__snapshots__/{db-query.test.ts.snap → db.test.ts.snap} +42 -196
  74. package/src/live-queries/base-class.ts +40 -160
  75. package/src/live-queries/computed.ts +19 -45
  76. package/src/live-queries/{db-query.test.ts → db.test.ts} +11 -21
  77. package/src/live-queries/{db-query.ts → db.ts} +39 -97
  78. package/src/live-queries/graphql.ts +21 -47
  79. package/src/reactive.ts +27 -52
  80. package/src/row-query-utils.ts +18 -29
  81. package/src/store/create-store.ts +23 -20
  82. package/src/store/devtools.ts +17 -17
  83. package/src/store/store-types.ts +5 -7
  84. package/src/store/store.ts +122 -231
  85. package/src/utils/stack-info.test.ts +1 -58
  86. package/src/utils/stack-info.ts +1 -6
  87. package/src/utils/tests/fixture.ts +7 -2
  88. package/src/utils/tests/mod.ts +0 -1
  89. package/dist/SqliteDbWrapper.d.ts +0 -54
  90. package/dist/SqliteDbWrapper.d.ts.map +0 -1
  91. package/dist/SqliteDbWrapper.js +0 -212
  92. package/dist/SqliteDbWrapper.js.map +0 -1
  93. package/dist/__tests__/fixture.d.ts +0 -252
  94. package/dist/__tests__/fixture.d.ts.map +0 -1
  95. package/dist/__tests__/fixture.js +0 -18
  96. package/dist/__tests__/fixture.js.map +0 -1
  97. package/dist/live-queries/db-query.d.ts +0 -67
  98. package/dist/live-queries/db-query.d.ts.map +0 -1
  99. package/dist/live-queries/db-query.js +0 -244
  100. package/dist/live-queries/db-query.js.map +0 -1
  101. package/dist/live-queries/db-query.test.d.ts +0 -2
  102. package/dist/live-queries/db-query.test.d.ts.map +0 -1
  103. package/dist/live-queries/db-query.test.js +0 -123
  104. package/dist/live-queries/db-query.test.js.map +0 -1
  105. package/dist/live-queries/make-ref.d.ts +0 -20
  106. package/dist/live-queries/make-ref.d.ts.map +0 -1
  107. package/dist/live-queries/make-ref.js +0 -33
  108. package/dist/live-queries/make-ref.js.map +0 -1
  109. package/dist/store/store.test.d.ts +0 -2
  110. package/dist/store/store.test.d.ts.map +0 -1
  111. package/dist/store/store.test.js +0 -27
  112. package/dist/store/store.test.js.map +0 -1
  113. package/dist/utils/expo.d.ts +0 -2
  114. package/dist/utils/expo.d.ts.map +0 -1
  115. package/dist/utils/expo.js +0 -8
  116. package/dist/utils/expo.js.map +0 -1
  117. package/dist/utils/function-string.d.ts +0 -7
  118. package/dist/utils/function-string.d.ts.map +0 -1
  119. package/dist/utils/function-string.js +0 -9
  120. package/dist/utils/function-string.js.map +0 -1
  121. package/src/live-queries/make-ref.ts +0 -47
  122. package/src/utils/function-string.ts +0 -12
@@ -4,33 +4,28 @@ import { DbSchema } from '@livestore/common/schema'
4
4
  import { shouldNeverHappen } from '@livestore/utils'
5
5
  import type * as otel from '@opentelemetry/api'
6
6
 
7
- import type { GetResult, LiveQueryDef, ReactivityGraphContext } from './live-queries/base-class.js'
7
+ import type { LiveQuery, LiveQueryAny, QueryContext } from './live-queries/base-class.js'
8
8
  import { computed } from './live-queries/computed.js'
9
9
 
10
10
  export const rowQueryLabel = (table: DbSchema.TableDefBase, id: string | SessionIdSymbol | undefined) =>
11
11
  `row:${table.sqliteDef.name}${id === undefined ? '' : id === SessionIdSymbol ? `:sessionId` : `:${id}`}`
12
12
 
13
13
  export const deriveColQuery: {
14
- <TQueryDef extends LiveQueryDef<any, QueryInfo.None>, TCol extends keyof GetResult<TQueryDef> & string>(
15
- queryDef: TQueryDef,
14
+ <TQuery extends LiveQuery<any, QueryInfo.None>, TCol extends keyof TQuery['__result!'] & string>(
15
+ query$: TQuery,
16
16
  colName: TCol,
17
- ): LiveQueryDef<GetResult<TQueryDef>[TCol], QueryInfo.None>
18
- <TQueryDef extends LiveQueryDef<any, QueryInfo.Row>, TCol extends keyof GetResult<TQueryDef> & string>(
19
- queryDef: TQueryDef,
17
+ ): LiveQuery<TQuery['__result!'][TCol], QueryInfo.None>
18
+ <TQuery extends LiveQuery<any, QueryInfo.Row>, TCol extends keyof TQuery['__result!'] & string>(
19
+ query$: TQuery,
20
20
  colName: TCol,
21
- ): LiveQueryDef<GetResult<TQueryDef>[TCol], QueryInfo.Col>
22
- } = (queryDef: LiveQueryDef<any, QueryInfo.Row | QueryInfo.Col>, colName: string) => {
23
- return computed((get) => get(queryDef)[colName], {
24
- label: `deriveColQuery:${queryDef.label}:${colName}`,
21
+ ): LiveQuery<TQuery['__result!'][TCol], QueryInfo.Col>
22
+ } = (query$: LiveQueryAny, colName: string) => {
23
+ return computed((get) => get(query$)[colName], {
24
+ label: `deriveColQuery:${query$.label}:${colName}`,
25
25
  queryInfo:
26
- queryDef.queryInfo._tag === 'Row'
27
- ? { _tag: 'Col', table: queryDef.queryInfo.table, column: colName, id: queryDef.queryInfo.id }
26
+ query$.queryInfo._tag === 'Row'
27
+ ? { _tag: 'Col', table: query$.queryInfo.table, column: colName, id: query$.queryInfo.id }
28
28
  : undefined,
29
- deps: [
30
- queryDef.queryInfo.table.sqliteDef.name,
31
- queryDef.queryInfo.id === SessionIdSymbol ? 'sessionId' : queryDef.queryInfo.id,
32
- queryDef.queryInfo._tag === 'Col' ? queryDef.queryInfo.column : undefined,
33
- ],
34
29
  }) as any
35
30
  }
36
31
 
@@ -46,17 +41,15 @@ export const makeExecBeforeFirstRun =
46
41
  table: DbSchema.TableDefBase
47
42
  otelContext: otel.Context | undefined
48
43
  }) =>
49
- ({ store }: ReactivityGraphContext) => {
44
+ ({ store }: QueryContext) => {
50
45
  const otelContext = otelContext_ ?? store.otel.queriesSpanContext
51
46
 
52
47
  if (table.options.isSingleton === false) {
53
48
  const idStr = id === SessionIdSymbol ? store.sessionId : id!
54
49
  const rowExists =
55
- store.sqliteDbWrapper.select(
56
- `SELECT 1 FROM '${table.sqliteDef.name}' WHERE id = ?`,
57
- [idStr] as any as PreparedBindValues,
58
- { otelContext },
59
- ).length === 1
50
+ store.syncDbWrapper.select(`SELECT 1 FROM '${table.sqliteDef.name}' WHERE id = ?`, {
51
+ bindValues: [idStr] as any as PreparedBindValues,
52
+ }).length === 1
60
53
 
61
54
  if (rowExists) return
62
55
 
@@ -66,11 +59,7 @@ export const makeExecBeforeFirstRun =
66
59
  )
67
60
  }
68
61
 
69
- // It's important that we only mutate and don't refresh here, as this function might be called during a render
70
- // and otherwise we might end up in a "reactive loop"
71
- store.mutate(
72
- { otelContext, skipRefresh: true, label: `rowQuery:${table.sqliteDef.name}:${idStr}` },
73
- table.insert({ id, ...insertValues }),
74
- )
62
+ // NOTE It's important that we only mutate and don't refresh here, as this function is called during a render
63
+ store.mutate({ otelContext, skipRefresh: true }, table.insert({ id, ...insertValues }))
75
64
  }
76
65
  }
@@ -14,7 +14,6 @@ import {
14
14
  Effect,
15
15
  Exit,
16
16
  identity,
17
- Layer,
18
17
  Logger,
19
18
  LogLevel,
20
19
  MutableHashMap,
@@ -27,7 +26,8 @@ import {
27
26
  import { nanoid } from '@livestore/utils/nanoid'
28
27
  import * as otel from '@opentelemetry/api'
29
28
 
30
- import { LiveStoreContextRunning } from '../effect/index.js'
29
+ import { globalReactivityGraph } from '../global-state.js'
30
+ import type { ReactivityGraph } from '../live-queries/base-class.js'
31
31
  import { connectDevtoolsToStore } from './devtools.js'
32
32
  import { Store } from './store.js'
33
33
  import type { BaseGraphQLContext, GraphQLOptions, OtelOptions, ShutdownDeferred } from './store-types.js'
@@ -36,11 +36,12 @@ export interface CreateStoreOptions<TGraphQLContext extends BaseGraphQLContext,
36
36
  schema: TSchema
37
37
  adapter: Adapter
38
38
  storeId: string
39
+ reactivityGraph?: ReactivityGraph
39
40
  graphQLOptions?: GraphQLOptions<TGraphQLContext>
40
41
  boot?: (
41
42
  store: Store<TGraphQLContext, TSchema>,
42
43
  parentSpan: otel.Span,
43
- ) => void | Promise<void> | Effect.Effect<void, unknown, OtelTracer.OtelTracer | LiveStoreContextRunning>
44
+ ) => void | Promise<void> | Effect.Effect<void, unknown, OtelTracer.OtelTracer>
44
45
  batchUpdates?: (run: () => void) => void
45
46
  disableDevtools?: boolean
46
47
  onBootStatus?: (status: BootStatus) => void
@@ -94,6 +95,7 @@ export const createStore = <
94
95
  storeId,
95
96
  graphQLOptions,
96
97
  boot,
98
+ reactivityGraph = globalReactivityGraph,
97
99
  batchUpdates,
98
100
  disableDevtools,
99
101
  onBootStatus,
@@ -161,28 +163,29 @@ export const createStore = <
161
163
  // TODO fill up with unsynced mutation events from the client session
162
164
  const unsyncedMutationEvents = MutableHashMap.empty<EventId.EventId, MutationEvent.ForSchema<TSchema>>()
163
165
 
164
- const store = new Store<TGraphQLContext, TSchema>({
165
- clientSession,
166
- schema,
167
- graphQLOptions,
168
- otelOptions: { tracer: otelTracer, rootSpanContext: otelRootSpanContext },
169
- disableDevtools,
170
- unsyncedMutationEvents,
171
- lifetimeScope,
172
- runtime,
173
- // NOTE during boot we're not yet executing mutations in a batched context
174
- // but only set the provided `batchUpdates` function after boot
175
- batchUpdates: (run) => run(),
176
- storeId,
177
- })
178
-
179
- yield* store.boot
166
+ const store = Store.createStore<TGraphQLContext, TSchema>(
167
+ {
168
+ clientSession,
169
+ schema,
170
+ graphQLOptions,
171
+ otelOptions: { tracer: otelTracer, rootSpanContext: otelRootSpanContext },
172
+ reactivityGraph,
173
+ disableDevtools,
174
+ unsyncedMutationEvents,
175
+ lifetimeScope,
176
+ runtime,
177
+ // NOTE during boot we're not yet executing mutations in a batched context
178
+ // but only set the provided `batchUpdates` function after boot
179
+ batchUpdates: (run) => run(),
180
+ storeId,
181
+ },
182
+ span,
183
+ )
180
184
 
181
185
  if (boot !== undefined) {
182
186
  // TODO also incorporate `boot` function progress into `bootStatusQueue`
183
187
  yield* Effect.tryAll(() => boot(store, span)).pipe(
184
188
  UnexpectedError.mapToUnexpectedError,
185
- Effect.provide(Layer.succeed(LiveStoreContextRunning, { stage: 'running', store: store as any as Store })),
186
189
  Effect.withSpan('createStore:boot'),
187
190
  )
188
191
  }
@@ -6,14 +6,14 @@ import { Effect, Stream } from '@livestore/utils/effect'
6
6
 
7
7
  import type { LiveQuery, ReactivityGraph } from '../live-queries/base-class.js'
8
8
  import { NOT_REFRESHED_YET } from '../reactive.js'
9
- import type { SqliteDbWrapper } from '../SqliteDbWrapper.js'
10
- import { emptyDebugInfo as makeEmptyDebugInfo } from '../SqliteDbWrapper.js'
9
+ import type { SynchronousDatabaseWrapper } from '../SynchronousDatabaseWrapper.js'
10
+ import { emptyDebugInfo as makeEmptyDebugInfo } from '../SynchronousDatabaseWrapper.js'
11
11
  import type { ReferenceCountedSet } from '../utils/data-structures.js'
12
12
 
13
13
  type IStore = {
14
14
  clientSession: ClientSession
15
15
  reactivityGraph: ReactivityGraph
16
- sqliteDbWrapper: SqliteDbWrapper
16
+ syncDbWrapper: SynchronousDatabaseWrapper
17
17
  activeQueries: ReferenceCountedSet<LiveQuery<any>>
18
18
  }
19
19
 
@@ -73,7 +73,7 @@ export const connectDevtoolsToStore = ({
73
73
  const requestIdleCallback = globalThis.requestIdleCallback ?? ((cb: () => void) => cb())
74
74
 
75
75
  switch (decodedMessage._tag) {
76
- case 'LSD.ClientSession.ReactivityGraphSubscribe': {
76
+ case 'LSD.ReactivityGraphSubscribe': {
77
77
  const includeResults = decodedMessage.includeResults
78
78
 
79
79
  const send = () =>
@@ -104,10 +104,10 @@ export const connectDevtoolsToStore = ({
104
104
 
105
105
  break
106
106
  }
107
- case 'LSD.ClientSession.DebugInfoReq': {
107
+ case 'LSD.DebugInfoReq': {
108
108
  sendToDevtools(
109
109
  Devtools.DebugInfoRes.make({
110
- debugInfo: store.sqliteDbWrapper.debugInfo,
110
+ debugInfo: store.syncDbWrapper.debugInfo,
111
111
  requestId,
112
112
  clientId,
113
113
  sessionId,
@@ -116,19 +116,19 @@ export const connectDevtoolsToStore = ({
116
116
  )
117
117
  break
118
118
  }
119
- case 'LSD.ClientSession.DebugInfoHistorySubscribe': {
119
+ case 'LSD.DebugInfoHistorySubscribe': {
120
120
  const buffer: DebugInfo[] = []
121
121
  let hasStopped = false
122
122
  let tickHandle: number | undefined
123
123
 
124
124
  const tick = () => {
125
- buffer.push(store.sqliteDbWrapper.debugInfo)
125
+ buffer.push(store.syncDbWrapper.debugInfo)
126
126
 
127
127
  // NOTE this resets the debug info, so all other "readers" e.g. in other `requestAnimationFrame` loops,
128
128
  // will get the empty debug info
129
129
  // TODO We need to come up with a more graceful way to do store. Probably via a single global
130
130
  // `requestAnimationFrame` loop that is passed in somehow.
131
- store.sqliteDbWrapper.debugInfo = makeEmptyDebugInfo()
131
+ store.syncDbWrapper.debugInfo = makeEmptyDebugInfo()
132
132
 
133
133
  if (buffer.length > 10) {
134
134
  sendToDevtools(
@@ -162,31 +162,31 @@ export const connectDevtoolsToStore = ({
162
162
 
163
163
  break
164
164
  }
165
- case 'LSD.ClientSession.DebugInfoHistoryUnsubscribe': {
165
+ case 'LSD.DebugInfoHistoryUnsubscribe': {
166
166
  // NOTE given WebMesh channels have persistent retry behaviour, it can happen that a previous
167
167
  // WebMesh channel will send a unsubscribe message for an old requestId. Thus the `?.()` handling.
168
168
  debugInfoHistorySubscriptions.get(requestId)?.()
169
169
  debugInfoHistorySubscriptions.delete(requestId)
170
170
  break
171
171
  }
172
- case 'LSD.ClientSession.DebugInfoResetReq': {
173
- store.sqliteDbWrapper.debugInfo.slowQueries.clear()
172
+ case 'LSD.DebugInfoResetReq': {
173
+ store.syncDbWrapper.debugInfo.slowQueries.clear()
174
174
  sendToDevtools(Devtools.DebugInfoResetRes.make({ requestId, clientId, sessionId, liveStoreVersion }))
175
175
  break
176
176
  }
177
- case 'LSD.ClientSession.DebugInfoRerunQueryReq': {
177
+ case 'LSD.DebugInfoRerunQueryReq': {
178
178
  const { queryStr, bindValues, queriedTables } = decodedMessage
179
- store.sqliteDbWrapper.select(queryStr, bindValues, { queriedTables, skipCache: true })
179
+ store.syncDbWrapper.select(queryStr, { bindValues, queriedTables, skipCache: true })
180
180
  sendToDevtools(Devtools.DebugInfoRerunQueryRes.make({ requestId, clientId, sessionId, liveStoreVersion }))
181
181
  break
182
182
  }
183
- case 'LSD.ClientSession.ReactivityGraphUnsubscribe': {
183
+ case 'LSD.ReactivityGraphUnsubscribe': {
184
184
  // NOTE given WebMesh channels have persistent retry behaviour, it can happen that a previous
185
185
  // WebMesh channel will send a unsubscribe message for an old requestId. Thus the `?.()` handling.
186
186
  reactivityGraphSubcriptions.get(requestId)?.()
187
187
  break
188
188
  }
189
- case 'LSD.ClientSession.LiveQueriesSubscribe': {
189
+ case 'LSD.LiveQueriesSubscribe': {
190
190
  const send = () =>
191
191
  requestIdleCallback(
192
192
  () =>
@@ -222,7 +222,7 @@ export const connectDevtoolsToStore = ({
222
222
 
223
223
  break
224
224
  }
225
- case 'LSD.ClientSession.LiveQueriesUnsubscribe': {
225
+ case 'LSD.LiveQueriesUnsubscribe': {
226
226
  // NOTE given WebMesh channels have persistent retry behaviour, it can happen that a previous
227
227
  // WebMesh channel will send a unsubscribe message for an old requestId. Thus the `?.()` handling.
228
228
  liveQueriesSubscriptions.get(requestId)?.()
@@ -5,8 +5,9 @@ import { Schema } from '@livestore/utils/effect'
5
5
  import type * as otel from '@opentelemetry/api'
6
6
  import type { GraphQLSchema } from 'graphql'
7
7
 
8
+ import type { ReactivityGraph } from '../live-queries/base-class.js'
8
9
  import type { DebugRefreshReasonBase } from '../reactive.js'
9
- import type { SqliteDbWrapper } from '../SqliteDbWrapper.js'
10
+ import type { SynchronousDatabaseWrapper } from '../SynchronousDatabaseWrapper.js'
10
11
  import type { StackInfo } from '../utils/stack-info.js'
11
12
  import type { Store } from './store.js'
12
13
 
@@ -42,7 +43,7 @@ export type BaseGraphQLContext = {
42
43
 
43
44
  export type GraphQLOptions<TContext> = {
44
45
  schema: GraphQLSchema
45
- makeContext: (db: SqliteDbWrapper, tracer: otel.Tracer, sessionId: string) => TContext
46
+ makeContext: (db: SynchronousDatabaseWrapper, tracer: otel.Tracer, sessionId: string) => TContext
46
47
  }
47
48
 
48
49
  export type OtelOptions = {
@@ -60,6 +61,7 @@ export type StoreOptions<
60
61
  // TODO remove graphql-related stuff from store and move to GraphQL query directly
61
62
  graphQLOptions?: GraphQLOptions<TGraphQLContext>
62
63
  otelOptions: OtelOptions
64
+ reactivityGraph: ReactivityGraph
63
65
  disableDevtools?: boolean
64
66
  lifetimeScope: Scope.Scope
65
67
  runtime: Runtime.Runtime<Scope.Scope>
@@ -73,7 +75,7 @@ export type RefreshReason =
73
75
  | {
74
76
  _tag: 'mutate'
75
77
  /** The mutations that were applied */
76
- mutations: ReadonlyArray<MutationEvent.AnyDecoded | MutationEvent.PartialAnyDecoded>
78
+ mutations: ReadonlyArray<MutationEvent.AnyDecoded | MutationEvent.PartialAny>
77
79
 
78
80
  /** The tables that were written to by the event */
79
81
  writeTables: ReadonlyArray<string>
@@ -85,8 +87,6 @@ export type RefreshReason =
85
87
  label?: string
86
88
  stackInfo?: StackInfo
87
89
  }
88
- | { _tag: 'subscribe.initial'; label?: string }
89
- | { _tag: 'subscribe.update'; label?: string }
90
90
  | { _tag: 'manual'; label?: string }
91
91
 
92
92
  export type QueryDebugInfo = {
@@ -108,5 +108,3 @@ export type StoreMutateOptions = {
108
108
  spanLinks?: otel.Link[]
109
109
  otelContext?: otel.Context
110
110
  }
111
-
112
- export type Unsubscribe = () => void