atom.io 0.31.0 → 0.32.0

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 (171) hide show
  1. package/data/dist/index.d.ts +867 -101
  2. package/data/dist/index.js +10 -558
  3. package/data/src/index.ts +0 -2
  4. package/data/src/struct-family.ts +1 -1
  5. package/data/src/struct.ts +1 -2
  6. package/dist/chunk-354XQWHH.js +153 -0
  7. package/dist/chunk-4LWKCEW3.js +14 -0
  8. package/dist/chunk-5F2V7S3B.js +83 -0
  9. package/dist/chunk-ECOMOMUN.js +631 -0
  10. package/dist/{chunk-42UH5F5Q.js → chunk-GY2XQYZY.js} +2051 -755
  11. package/dist/chunk-NF7FJKJD.js +107 -0
  12. package/dist/chunk-R3ZUK5EH.js +1024 -0
  13. package/dist/chunk-Z2UJW4NQ.js +523 -0
  14. package/dist/index.d.ts +855 -127
  15. package/dist/index.js +1 -143
  16. package/eslint-plugin/dist/index.d.ts +1 -30
  17. package/eslint-plugin/dist/index.js +0 -146
  18. package/eslint-plugin/src/index.ts +0 -1
  19. package/eslint-plugin/src/rules/index.ts +0 -1
  20. package/internal/dist/index.d.ts +794 -70
  21. package/internal/dist/index.js +1 -2
  22. package/internal/src/atom/create-regular-atom.ts +3 -3
  23. package/internal/src/atom/dispose-atom.ts +4 -13
  24. package/internal/src/atom/is-default.ts +3 -3
  25. package/internal/src/caching.ts +5 -5
  26. package/internal/src/capitalize.ts +3 -0
  27. package/internal/src/families/create-readonly-selector-family.ts +5 -6
  28. package/internal/src/families/create-writable-selector-family.ts +1 -4
  29. package/internal/src/families/dispose-from-store.ts +3 -13
  30. package/internal/src/families/find-in-store.ts +1 -6
  31. package/internal/src/get-state/get-from-store.ts +2 -2
  32. package/internal/src/get-state/read-or-compute-value.ts +1 -1
  33. package/internal/src/index.ts +19 -9
  34. package/internal/src/ingest-updates/ingest-creation-disposal.ts +2 -3
  35. package/internal/src/install-into-store.ts +48 -0
  36. package/internal/src/join/edit-relations-in-store.ts +32 -0
  37. package/internal/src/join/find-relations-in-store.ts +124 -0
  38. package/internal/src/join/get-internal-relations-from-store.ts +14 -0
  39. package/internal/src/join/get-join.ts +31 -0
  40. package/internal/src/join/index.ts +5 -0
  41. package/{data/src/join.ts → internal/src/join/join-internal.ts} +20 -429
  42. package/internal/src/keys.ts +7 -7
  43. package/internal/src/molecule.ts +299 -0
  44. package/internal/src/mutable/create-mutable-atom-family.ts +1 -1
  45. package/internal/src/mutable/create-mutable-atom.ts +3 -3
  46. package/internal/src/mutable/get-json-token.ts +1 -1
  47. package/internal/src/mutable/tracker-family.ts +19 -17
  48. package/internal/src/mutable/tracker.ts +8 -8
  49. package/internal/src/not-found-error.ts +8 -30
  50. package/internal/src/pretty-print.ts +2 -13
  51. package/internal/src/selector/create-readonly-selector.ts +3 -7
  52. package/internal/src/selector/create-writable-selector.ts +4 -4
  53. package/internal/src/selector/dispose-selector.ts +20 -11
  54. package/internal/src/selector/get-selector-dependency-keys.ts +1 -1
  55. package/internal/src/selector/register-selector.ts +7 -17
  56. package/internal/src/selector/trace-selector-atoms.ts +2 -2
  57. package/internal/src/set-state/copy-mutable-if-needed.ts +1 -1
  58. package/internal/src/set-state/emit-update.ts +1 -1
  59. package/internal/src/set-state/evict-downstream.ts +1 -1
  60. package/internal/src/set-state/set-atom-or-selector.ts +1 -1
  61. package/internal/src/set-state/set-atom.ts +10 -10
  62. package/internal/src/set-state/set-into-store.ts +2 -2
  63. package/internal/src/set-state/stow-update.ts +1 -1
  64. package/internal/src/store/deposit.ts +10 -8
  65. package/internal/src/store/store.ts +1 -1
  66. package/internal/src/store/withdraw.ts +34 -53
  67. package/internal/src/subscribe/recall-state.ts +1 -1
  68. package/internal/src/subscribe/subscribe-in-store.ts +3 -3
  69. package/internal/src/subscribe/subscribe-to-root-atoms.ts +3 -3
  70. package/internal/src/subscribe/subscribe-to-state.ts +5 -5
  71. package/internal/src/subscribe/subscribe-to-timeline.ts +3 -3
  72. package/internal/src/subscribe/subscribe-to-transaction.ts +3 -3
  73. package/internal/src/timeline/create-timeline.ts +17 -37
  74. package/internal/src/transaction/act-upon-store.ts +2 -2
  75. package/internal/src/transaction/apply-transaction.ts +5 -5
  76. package/internal/src/transaction/assign-transaction-to-continuity.ts +1 -1
  77. package/internal/src/transaction/build-transaction.ts +5 -8
  78. package/internal/src/transaction/create-transaction.ts +3 -3
  79. package/internal/src/transaction/get-epoch-number.ts +3 -3
  80. package/internal/src/transaction/set-epoch-number.ts +2 -2
  81. package/introspection/dist/index.d.ts +922 -6
  82. package/introspection/dist/index.js +2 -620
  83. package/json/dist/index.d.ts +899 -5
  84. package/json/dist/index.js +1 -81
  85. package/json/src/select-json-family.ts +3 -14
  86. package/package.json +27 -45
  87. package/react/dist/index.d.ts +921 -3
  88. package/react/dist/index.js +2 -82
  89. package/react/src/use-o.ts +1 -1
  90. package/react/src/use-tl.ts +2 -2
  91. package/react-devtools/dist/index.css +16 -14
  92. package/react-devtools/dist/index.d.ts +26 -1
  93. package/react-devtools/dist/index.js +6 -6
  94. package/react-devtools/src/devtools.scss +16 -14
  95. package/realtime/dist/index.d.ts +202 -8
  96. package/realtime/dist/index.js +2 -107
  97. package/realtime/src/realtime-continuity.ts +2 -2
  98. package/realtime/src/shared-room-store.ts +1 -2
  99. package/realtime-client/dist/index.d.ts +960 -22
  100. package/realtime-client/dist/index.js +3 -509
  101. package/realtime-client/src/continuity/register-and-attempt-confirmed-update.ts +3 -3
  102. package/realtime-client/src/continuity/use-conceal-state.ts +1 -1
  103. package/realtime-client/src/pull-atom-family-member.ts +2 -2
  104. package/realtime-client/src/pull-atom.ts +2 -2
  105. package/realtime-client/src/pull-mutable-atom-family-member.ts +2 -2
  106. package/realtime-client/src/pull-mutable-atom.ts +2 -2
  107. package/realtime-client/src/pull-selector-family-member.ts +4 -4
  108. package/realtime-client/src/pull-selector.ts +4 -4
  109. package/realtime-client/src/push-state.ts +5 -10
  110. package/realtime-client/src/server-action.ts +4 -4
  111. package/realtime-client/src/sync-continuity.ts +6 -6
  112. package/realtime-react/dist/index.d.ts +166 -12
  113. package/realtime-react/dist/index.js +5 -154
  114. package/realtime-react/src/use-pull-atom-family-member.ts +1 -1
  115. package/realtime-react/src/use-pull-atom.ts +1 -1
  116. package/realtime-react/src/use-pull-mutable-atom.ts +1 -1
  117. package/realtime-react/src/use-pull-mutable-family-member.ts +1 -1
  118. package/realtime-react/src/use-pull-selector-family-member.ts +1 -1
  119. package/realtime-react/src/use-pull-selector.ts +1 -1
  120. package/realtime-react/src/use-push.ts +1 -1
  121. package/realtime-react/src/use-server-action.ts +2 -2
  122. package/realtime-react/src/use-sync-continuity.ts +1 -1
  123. package/realtime-server/dist/index.d.ts +971 -28
  124. package/realtime-server/dist/index.js +3 -1001
  125. package/realtime-server/src/continuity/prepare-to-serve-transaction-request.ts +1 -1
  126. package/realtime-server/src/continuity/prepare-to-sync-realtime-continuity.ts +3 -3
  127. package/realtime-server/src/continuity/subscribe-to-continuity-actions.ts +2 -2
  128. package/realtime-server/src/continuity/subscribe-to-continuity-perpectives.ts +2 -2
  129. package/realtime-server/src/ipc-sockets/child-socket.ts +0 -1
  130. package/realtime-server/src/realtime-action-receiver.ts +1 -1
  131. package/realtime-server/src/realtime-family-provider.ts +2 -2
  132. package/realtime-server/src/realtime-mutable-family-provider.ts +2 -2
  133. package/realtime-server/src/realtime-mutable-provider.ts +2 -2
  134. package/realtime-server/src/realtime-server-stores/server-room-external-actions.ts +2 -1
  135. package/realtime-server/src/realtime-server-stores/server-room-external-store.ts +1 -1
  136. package/realtime-server/src/realtime-server-stores/server-user-store.ts +1 -2
  137. package/realtime-server/src/realtime-state-provider.ts +2 -2
  138. package/realtime-testing/dist/index.d.ts +1091 -3
  139. package/realtime-testing/dist/index.js +23 -26
  140. package/realtime-testing/src/setup-realtime-test.tsx +6 -5
  141. package/src/atom.ts +53 -29
  142. package/src/dispose-state.ts +12 -2
  143. package/{ephemeral/src → src}/find-state.ts +35 -25
  144. package/src/get-state.ts +16 -0
  145. package/src/index.ts +77 -3
  146. package/src/join.ts +218 -0
  147. package/src/realm.ts +169 -0
  148. package/src/selector.ts +20 -0
  149. package/src/set-state.ts +16 -8
  150. package/src/silo.ts +13 -7
  151. package/src/timeline.ts +1 -1
  152. package/src/transaction.ts +4 -8
  153. package/transceivers/set-rtx/dist/index.d.ts +37 -2
  154. package/transceivers/set-rtx/dist/index.js +1 -212
  155. package/transceivers/set-rtx/src/set-rtx.ts +4 -1
  156. package/web/dist/index.d.ts +30 -1
  157. package/web/dist/index.js +1 -15
  158. package/data/src/until.ts +0 -15
  159. package/dist/chunk-ICGFFQ3H.js +0 -272
  160. package/ephemeral/dist/index.d.ts +0 -57
  161. package/ephemeral/dist/index.js +0 -9
  162. package/ephemeral/package.json +0 -13
  163. package/ephemeral/src/index.ts +0 -1
  164. package/eslint-plugin/src/rules/lifespan.ts +0 -203
  165. package/immortal/dist/index.d.ts +0 -12
  166. package/immortal/dist/index.js +0 -9
  167. package/immortal/package.json +0 -13
  168. package/immortal/src/index.ts +0 -1
  169. package/immortal/src/seek-state.ts +0 -60
  170. package/src/allocate.ts +0 -443
  171. package/src/molecule.ts +0 -16
@@ -17,7 +17,6 @@ import type {
17
17
  TransactionUpdate,
18
18
  TransactionUpdateContent,
19
19
  } from "atom.io"
20
- import { stringifyJson } from "atom.io/json"
21
20
 
22
21
  import { newest } from "../lineage"
23
22
  import { getUpdateToken } from "../mutable"
@@ -78,8 +77,8 @@ export type Timeline<ManagedAtom extends TimelineManageable> = {
78
77
  }
79
78
 
80
79
  export function createTimeline<ManagedAtom extends TimelineManageable>(
81
- options: TimelineOptions<ManagedAtom>,
82
80
  store: Store,
81
+ options: TimelineOptions<ManagedAtom>,
83
82
  data?: Timeline<ManagedAtom>,
84
83
  ): TimelineToken<ManagedAtom> {
85
84
  const tl: Timeline<ManagedAtom> = {
@@ -92,7 +91,7 @@ export function createTimeline<ManagedAtom extends TimelineManageable>(
92
91
  transactionKey: null,
93
92
  ...data,
94
93
  history: data?.history.map((update) => ({ ...update })) ?? [],
95
- install: (s) => createTimeline(options, s, tl),
94
+ install: (s) => createTimeline(s, options, tl),
96
95
  subject: new Subject(),
97
96
  subscriptions: new Map(),
98
97
  }
@@ -131,7 +130,7 @@ export function createTimeline<ManagedAtom extends TimelineManageable>(
131
130
  )
132
131
  continue
133
132
  }
134
- addAtomToTimeline(atomToken, tl, store)
133
+ addAtomToTimeline(store, atomToken, tl)
135
134
  }
136
135
  break
137
136
 
@@ -151,28 +150,9 @@ export function createTimeline<ManagedAtom extends TimelineManageable>(
151
150
  )
152
151
  continue
153
152
  }
154
- addAtomFamilyToTimeline(familyToken, tl, store)
153
+ addAtomFamilyToTimeline(store, familyToken, tl)
155
154
  }
156
155
  break
157
-
158
- // case `molecule_family`:
159
- // {
160
- // const familyToken: MoleculeFamilyToken<any> = initialTopic
161
- // const familyKey = familyToken.key
162
- // const existingTimelineKey =
163
- // target.timelineTopics.getRelatedKey(familyKey)
164
- // if (existingTimelineKey) {
165
- // store.logger.error(
166
- // `❌`,
167
- // `timeline`,
168
- // options.key,
169
- // `Failed to add molecule family "${familyKey}" because it already belongs to timeline "${existingTimelineKey}"`,
170
- // )
171
- // continue
172
- // }
173
- // addMoleculeFamilyToTimeline(familyToken, tl, store)
174
- // }
175
- // break
176
156
  }
177
157
  }
178
158
 
@@ -186,14 +166,14 @@ export function createTimeline<ManagedAtom extends TimelineManageable>(
186
166
  }
187
167
 
188
168
  function addAtomToTimeline(
169
+ store: Store,
189
170
  atomToken: AtomToken<any>,
190
171
  tl: Timeline<any>,
191
- store: Store,
192
172
  ): void {
193
- let maybeAtom = withdraw(atomToken, store)
173
+ let maybeAtom = withdraw(store, atomToken)
194
174
  if (maybeAtom.type === `mutable_atom`) {
195
175
  const updateToken = getUpdateToken(maybeAtom)
196
- maybeAtom = withdraw(updateToken, store)
176
+ maybeAtom = withdraw(store, updateToken)
197
177
  }
198
178
  const atom = maybeAtom
199
179
  store.timelineTopics.set(
@@ -236,7 +216,7 @@ function addAtomToTimeline(
236
216
  )
237
217
  if (tl.timeTraveling === null) {
238
218
  if (txUpdateInProgress) {
239
- joinTransaction(tl, txUpdateInProgress, store)
219
+ joinTransaction(store, tl, txUpdateInProgress)
240
220
  } else if (currentSelectorKey && currentSelectorTime) {
241
221
  let latestUpdate: TimelineUpdate<any> | undefined = tl.history.at(-1)
242
222
 
@@ -330,11 +310,11 @@ function addAtomToTimeline(
330
310
  }
331
311
 
332
312
  function addAtomFamilyToTimeline(
313
+ store: Store,
333
314
  atomFamilyToken: AtomFamilyToken<any, any>,
334
315
  tl: Timeline<any>,
335
- store: Store,
336
316
  ): void {
337
- const family = withdraw(atomFamilyToken, store)
317
+ const family = withdraw(store, atomFamilyToken)
338
318
  store.timelineTopics.set(
339
319
  { topicKey: family.key, timelineKey: tl.key },
340
320
  { topicType: `atom_family` },
@@ -344,21 +324,21 @@ function addAtomFamilyToTimeline(
344
324
  family.subject.subscribe(
345
325
  `timeline`,
346
326
  function timelineCapturesStateLifecycleEvent(creationOrDisposal) {
347
- handleStateLifecycleEvent(creationOrDisposal, tl, store)
327
+ handleStateLifecycleEvent(store, creationOrDisposal, tl)
348
328
  },
349
329
  ),
350
330
  )
351
331
  for (const atom of store.atoms.values()) {
352
332
  if (atom.family?.key === family.key) {
353
- addAtomToTimeline(atom, tl, store)
333
+ addAtomToTimeline(store, atom, tl)
354
334
  }
355
335
  }
356
336
  }
357
337
 
358
338
  function joinTransaction(
339
+ store: Store,
359
340
  tl: Timeline<any>,
360
341
  txUpdateInProgress: TransactionUpdate<Func>,
361
- store: Store,
362
342
  ) {
363
343
  const currentTxKey = txUpdateInProgress.key
364
344
  const currentTxInstanceId = txUpdateInProgress.id
@@ -366,7 +346,7 @@ function joinTransaction(
366
346
  key: currentTxKey,
367
347
  type: `transaction`,
368
348
  }
369
- const currentTransaction = withdraw(currentTxToken, store)
349
+ const currentTransaction = withdraw(store, currentTxToken)
370
350
  if (currentTxKey && tl.transactionKey === null) {
371
351
  tl.transactionKey = currentTxKey
372
352
  const unsubscribe = currentTransaction.subject.subscribe(
@@ -453,9 +433,9 @@ function filterTransactionUpdates(
453
433
  }
454
434
 
455
435
  function handleStateLifecycleEvent(
436
+ store: Store,
456
437
  event: StateCreation<any> | StateDisposal<any>,
457
438
  tl: Timeline<any>,
458
- store: Store,
459
439
  ): void {
460
440
  const timestamp = Date.now()
461
441
  const timelineEvent = Object.assign(event, {
@@ -468,7 +448,7 @@ function handleStateLifecycleEvent(
468
448
  } else {
469
449
  const txUpdateInProgress = target.on.transactionApplying.state
470
450
  if (txUpdateInProgress) {
471
- joinTransaction(tl, txUpdateInProgress.update, store)
451
+ joinTransaction(store, tl, txUpdateInProgress.update)
472
452
  } else {
473
453
  tl.history.push(timelineEvent)
474
454
  tl.at = tl.history.length
@@ -478,7 +458,7 @@ function handleStateLifecycleEvent(
478
458
  }
479
459
  switch (event.type) {
480
460
  case `state_creation`:
481
- addAtomToTimeline(event.token, tl, store)
461
+ addAtomToTimeline(store, event.token, tl)
482
462
  break
483
463
  case `state_disposal`:
484
464
  tl.subscriptions.get(event.token.key)?.()
@@ -6,12 +6,12 @@ import { withdraw } from "../store"
6
6
  import type { Func } from "../utility-types"
7
7
 
8
8
  export function actUponStore<F extends Func>(
9
+ store: Store,
9
10
  token: TransactionToken<F>,
10
11
  id: string,
11
- store: Store,
12
12
  ): (...parameters: Parameters<F>) => ReturnType<F> {
13
13
  return (...parameters: Parameters<F>): ReturnType<F> => {
14
- const tx = withdraw(token, store)
14
+ const tx = withdraw(store, token)
15
15
  if (tx) {
16
16
  return tx.run(parameters, id)
17
17
  }
@@ -42,14 +42,14 @@ export const applyTransaction = <F extends Func>(
42
42
 
43
43
  if (isRootStore(parent)) {
44
44
  setEpochNumberOfAction(
45
+ parent,
45
46
  child.transactionMeta.update.key,
46
47
  child.transactionMeta.update.epoch,
47
- parent,
48
- )
49
- const myTransaction = withdraw<F>(
50
- { key: child.transactionMeta.update.key, type: `transaction` },
51
- store,
52
48
  )
49
+ const myTransaction = withdraw<F>(store, {
50
+ key: child.transactionMeta.update.key,
51
+ type: `transaction`,
52
+ })
53
53
  myTransaction?.subject.next(child.transactionMeta.update)
54
54
  store.logger.info(
55
55
  `🛬`,
@@ -2,9 +2,9 @@ import type { Store } from "../store"
2
2
  import { isRootStore } from "./is-root-store"
3
3
 
4
4
  export function assignTransactionToContinuity(
5
+ store: Store,
5
6
  continuityKey: string,
6
7
  transactionKey: string,
7
- store: Store,
8
8
  ): void {
9
9
  const isRoot = isRootStore(store)
10
10
  if (!isRoot) {
@@ -1,9 +1,7 @@
1
- import type { disposeState, getState, setState } from "atom.io"
2
- import type { findState } from "atom.io/ephemeral"
3
- import type { seekState } from "atom.io/immortal"
1
+ import type { disposeState, findState, getState, setState } from "atom.io"
4
2
 
5
3
  import { arbitrary } from "../arbitrary"
6
- import { disposeFromStore, findInStore, seekInStore } from "../families"
4
+ import { disposeFromStore, findInStore } from "../families"
7
5
  import { getEnvironmentData } from "../get-environment-data"
8
6
  import { getFromStore } from "../get-state"
9
7
  import { Junction } from "../junction"
@@ -18,9 +16,9 @@ import { actUponStore, getEpochNumberOfAction } from "."
18
16
  import type { ChildStore, RootStore } from "./is-root-store"
19
17
 
20
18
  export const buildTransaction = (
19
+ store: Store,
21
20
  key: string,
22
21
  params: any[],
23
- store: Store,
24
22
  id: string,
25
23
  ): ChildStore => {
26
24
  const parent = newest(store) as ChildStore | RootStore
@@ -61,7 +59,7 @@ export const buildTransaction = (
61
59
  }),
62
60
  miscResources: new LazyMap(parent.miscResources),
63
61
  }
64
- const epoch = getEpochNumberOfAction(key, store)
62
+ const epoch = getEpochNumberOfAction(store, key)
65
63
  const transactionMeta: TransactionProgress<Func> = {
66
64
  phase: `building`,
67
65
  update: {
@@ -80,9 +78,8 @@ export const buildTransaction = (
80
78
  setIntoStore(child, ...ps)
81
79
  }) as typeof setState,
82
80
  run: (token, identifier = arbitrary()) =>
83
- actUponStore(token, identifier, child),
81
+ actUponStore(child, token, identifier),
84
82
  find: ((token, k) => findInStore(child, token, k)) as typeof findState,
85
- seek: ((token, k) => seekInStore(child, token, k)) as typeof seekState,
86
83
  json: (token) => getJsonToken(child, token),
87
84
  dispose: ((...ps: Parameters<typeof disposeState>) => {
88
85
  disposeFromStore(child, ...ps)
@@ -22,14 +22,14 @@ export type Transaction<F extends Func> = {
22
22
  }
23
23
 
24
24
  export function createTransaction<F extends Func>(
25
- options: TransactionOptions<F>,
26
25
  store: Store,
26
+ options: TransactionOptions<F>,
27
27
  ): TransactionToken<F> {
28
28
  const newTransaction: Transaction<F> = {
29
29
  key: options.key,
30
30
  type: `transaction`,
31
31
  run: (params: Parameters<F>, id: string) => {
32
- const childStore = buildTransaction(options.key, params, store, id)
32
+ const childStore = buildTransaction(store, options.key, params, id)
33
33
  try {
34
34
  const target = newest(store)
35
35
  const { toolkit } = childStore.transactionMeta
@@ -42,7 +42,7 @@ export function createTransaction<F extends Func>(
42
42
  throw thrown
43
43
  }
44
44
  },
45
- install: (s) => createTransaction(options, s),
45
+ install: (s) => createTransaction(s, options),
46
46
  subject: new Subject(),
47
47
  }
48
48
  const target = newest(store)
@@ -2,8 +2,8 @@ import type { Store } from "../store"
2
2
  import { isRootStore } from "./is-root-store"
3
3
 
4
4
  export function getContinuityKey(
5
- transactionKey: string,
6
5
  store: Store,
6
+ transactionKey: string,
7
7
  ): string | undefined {
8
8
  const isRoot = isRootStore(store)
9
9
  const continuity = isRoot
@@ -13,8 +13,8 @@ export function getContinuityKey(
13
13
  }
14
14
 
15
15
  export function getEpochNumberOfContinuity(
16
- continuityKey: string,
17
16
  store: Store,
17
+ continuityKey: string,
18
18
  ): number | undefined {
19
19
  const isRoot = isRootStore(store)
20
20
  const epoch =
@@ -25,8 +25,8 @@ export function getEpochNumberOfContinuity(
25
25
  }
26
26
 
27
27
  export function getEpochNumberOfAction(
28
- transactionKey: string,
29
28
  store: Store,
29
+ transactionKey: string,
30
30
  ): number | undefined {
31
31
  const isRoot = isRootStore(store)
32
32
  const continuity = isRoot
@@ -2,9 +2,9 @@ import type { Store } from "../store"
2
2
  import { isRootStore } from "./is-root-store"
3
3
 
4
4
  export function setEpochNumberOfContinuity(
5
+ store: Store,
5
6
  continuityKey: string,
6
7
  newEpoch: number,
7
- store: Store,
8
8
  ): void {
9
9
  const isRoot = isRootStore(store)
10
10
  if (isRoot && continuityKey) {
@@ -13,9 +13,9 @@ export function setEpochNumberOfContinuity(
13
13
  }
14
14
 
15
15
  export function setEpochNumberOfAction(
16
+ store: Store,
16
17
  transactionKey: string,
17
18
  newEpoch: number,
18
- store: Store,
19
19
  ): void {
20
20
  const isRoot = isRootStore(store)
21
21
  if (!isRoot) {