@playfast/reform 1.1.1 → 1.2.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 (85) hide show
  1. package/README.md +85 -55
  2. package/package.json +17 -17
  3. package/src/boundary/boundary.test.ts +62 -16
  4. package/src/boundary/boundary.ts +141 -32
  5. package/src/calc/asyncCalc.invalidate.test.ts +516 -18
  6. package/src/calc/asyncCalc.test.ts +207 -175
  7. package/src/calc/asyncCalc.ts +168 -39
  8. package/src/calc/calc.test.ts +3 -5
  9. package/src/calc/calc.ts +44 -18
  10. package/src/calc/calcFamily.test.ts +80 -22
  11. package/src/calc/calcFamily.ts +56 -25
  12. package/src/calc/compose.ts +1 -14
  13. package/src/channel/channel.ts +128 -11
  14. package/src/compose/composition.test.ts +19 -0
  15. package/src/compose/composition.ts +346 -62
  16. package/src/compose/props.ts +13 -6
  17. package/src/compose/provide.ts +187 -46
  18. package/src/compose/slot.ts +156 -19
  19. package/src/compose/structure.test.ts +6 -3
  20. package/src/compose/structure.ts +106 -13
  21. package/src/compose/ui.test.ts +19 -3
  22. package/src/compose/ui.ts +147 -54
  23. package/src/compose/ui.typecheck.ts +40 -4
  24. package/src/definition/definition.ts +22 -9
  25. package/src/event/event.fromSource.test.ts +172 -0
  26. package/src/event/event.test.ts +10 -0
  27. package/src/event/event.ts +102 -18
  28. package/src/feature/feature.mount.test.ts +123 -56
  29. package/src/feature/feature.test.ts +67 -63
  30. package/src/feature/feature.ts +1317 -197
  31. package/src/feature/feature.typecheck.ts +253 -61
  32. package/src/graph/closure.ts +403 -0
  33. package/src/index.ts +171 -245
  34. package/src/internal/bucketCache.ts +39 -0
  35. package/src/internal/capture.ts +9 -4
  36. package/src/internal/env.ts +1 -3
  37. package/src/internal/errors.ts +21 -10
  38. package/src/internal/queryDriver.ts +120 -15
  39. package/src/internal/queryDriverStore.ts +8 -5
  40. package/src/internal/queryDriverTypes.ts +3 -1
  41. package/src/internal/reuse.test.ts +10 -3
  42. package/src/internal/reuse.ts +5 -2
  43. package/src/internal/scheduler.ts +4 -1
  44. package/src/internal/sources.ts +25 -11
  45. package/src/internal/track.ts +3 -2
  46. package/src/internal.ts +222 -0
  47. package/src/namespace/namespace.ts +46 -25
  48. package/src/procedure/procedure.ts +38 -11
  49. package/src/reducer/reducer.ts +78 -34
  50. package/src/remote/remoteState.test.ts +515 -339
  51. package/src/remote/remoteState.ts +572 -107
  52. package/src/remote/remoteState.typecheck.ts +47 -23
  53. package/src/runtime/appRuntime.activation.test.ts +100 -0
  54. package/src/runtime/appRuntime.test.ts +157 -105
  55. package/src/runtime/appRuntime.ts +394 -33
  56. package/src/runtime/eventBudget.test.ts +1 -4
  57. package/src/runtime/eventBudget.ts +9 -8
  58. package/src/runtime/hardening.test.ts +4 -9
  59. package/src/runtime/instrumentation.test.ts +174 -192
  60. package/src/runtime/instrumentation.ts +6 -11
  61. package/src/runtime/loop.test.ts +36 -0
  62. package/src/runtime/loop.ts +69 -40
  63. package/src/scene/featureScene.test.ts +4 -2
  64. package/src/scene/scene.ts +234 -64
  65. package/src/scene/seedScene.test.ts +69 -86
  66. package/src/state/state.nominal.typecheck.ts +68 -0
  67. package/src/state/state.test.ts +17 -0
  68. package/src/state/state.ts +79 -26
  69. package/src/state/stateFamily.test.ts +14 -0
  70. package/src/state/stateFamily.ts +55 -22
  71. package/src/state/stateGroup.ts +53 -17
  72. package/src/state/token.ts +40 -10
  73. package/src/synced/syncedStore.ts +46 -23
  74. package/src/testkit/flight.testkit.ts +75 -0
  75. package/src/wire/tree.test.ts +8 -4
  76. package/src/wire/triggers.test.ts +6 -2
  77. package/src/wire/triggers.ts +14 -10
  78. package/src/calc/asyncCalcDefinitions.ts +0 -48
  79. package/src/channel/procedureRegistry.ts +0 -90
  80. package/src/feature/featureBinding.ts +0 -48
  81. package/src/internal/ctx.ts +0 -9
  82. package/src/remote/remoteStateDefinition.ts +0 -135
  83. package/src/remote/remoteStateLayers.ts +0 -118
  84. package/src/remote/remoteStateLiveTypes.ts +0 -59
  85. package/src/remote/remoteStateSend.ts +0 -64
package/src/index.ts CHANGED
@@ -1,255 +1,181 @@
1
- export * as State from "./state/state";
2
- export * as StateGroup from "./state/stateGroup";
3
- export * as StateFamily from "./state/stateFamily";
4
- export { StateToken } from "./state/token";
5
- export type { AnySource, Source } from "./state/token";
6
-
7
- export * as Event from "./event/event";
8
- // TS2742: plain type export so declaration emit can name EventOf
9
- export type { EventOf } from "./event/event";
10
- export * as EventGroup from "./event/eventGroup";
1
+ export * as State from './state/state'
2
+ export type { StateClass, StateStore, StateValue } from './state/state'
3
+ export * as StateGroup from './state/stateGroup'
4
+ export type { SeedsOf } from './state/stateGroup'
5
+ export * as StateFamily from './state/stateFamily'
6
+ export type {
7
+ FamilyKey,
8
+ FamilyValue,
9
+ StateFamilyClass,
10
+ StateFamilyStore,
11
+ } from './state/stateFamily'
11
12
 
12
- export * as Reducer from "./reducer/reducer";
13
- export * as Calc from "./calc/calc";
14
- export * as CalcFamily from "./calc/calcFamily";
15
- export * as AsyncCalc from "./calc/asyncCalc";
16
- export { composeCalcs } from "./calc/compose";
13
+ export * as Event from './event/event'
14
+ // TS2742: direct type exports allow declaration emit to name event-derived types.
17
15
  export type {
18
- InputsObject,
19
- InputStores,
20
- InvalidateBy,
21
- } from "./internal/sources";
22
- export {
23
- AsyncData,
24
- type AsyncError,
25
- type AsyncIdle,
26
- type AsyncLoading,
27
- type AsyncSuccess,
28
- } from "./calc/asyncData";
29
- export { isLoading, type QueryState, toAsyncData } from "./calc/queryState";
30
- export {
31
- noopQueryStore,
32
- QueryStore,
33
- type QueryStoreApi,
34
- resolveQueryStore,
35
- } from "./internal/queryStore";
36
- export {
37
- noopQueryEvents,
38
- QueryEvents,
39
- type QueryEventsApi,
40
- resolveQueryEvents,
41
- } from "./internal/queryEvents";
42
- export * as RemoteState from "./remote/remoteState";
43
- // TS2742: plain type exports so declaration emit can name pending/failed types
16
+ EventClass,
17
+ EventOf,
18
+ EventPayload,
19
+ SourceChange,
20
+ SourceEventConfig,
21
+ SourceEventConfigExternalApi,
22
+ } from './event/event'
23
+ export * as EventGroup from './event/eventGroup'
24
+
25
+ export * as Reducer from './reducer/reducer'
26
+ export * as Calc from './calc/calc'
27
+ export type { CalcClass, CalcStore } from './calc/calc'
28
+ export * as CalcFamily from './calc/calcFamily'
29
+ export type { CalcFamilyClass, CalcFamilyStore } from './calc/calcFamily'
30
+ export * as AsyncCalc from './calc/asyncCalc'
31
+ export type { AsyncCalcClass, AsyncCalcStore } from './calc/asyncCalc'
32
+ export { composeCalcs } from './calc/compose'
33
+ export type { InputsObject, InputStores, InvalidateBy } from './internal/sources'
34
+ export {
35
+ AsyncData,
36
+ type AsyncError,
37
+ type AsyncIdle,
38
+ type AsyncLoading,
39
+ type AsyncSuccess,
40
+ } from './calc/asyncData'
41
+ export { isLoading, type QueryState, toAsyncData } from './calc/queryState'
42
+
43
+ export * as RemoteState from './remote/remoteState'
44
+ // TS2742: direct exports keep pending and failed state types nameable.
44
45
  export type {
45
- FailedIntent,
46
- PendingIntent,
47
- RemoteStateClass,
48
- RemoteStateSettled,
49
- } from "./remote/remoteState";
50
- export * as SyncedStore from "./synced/syncedStore";
51
- // TS2742: plain type export for SyncedSource nameability
52
- export type { SyncedSource, SyncedStoreClass } from "./synced/syncedStore";
53
- export * as Boundary from "./boundary/boundary";
54
- // TS2742: plain type exports for Boundary* nameability
46
+ FailedIntent,
47
+ PendingIntent,
48
+ RemoteStateClass,
49
+ RemoteStatePendingStore,
50
+ RemoteStateSettled,
51
+ RemoteStateTruthStore,
52
+ RemoteStateVisibleStore,
53
+ } from './remote/remoteState'
54
+ export * as SyncedStore from './synced/syncedStore'
55
+ // TS2742: adapters need a directly nameable synchronized source type.
56
+ export type { SyncedSource, SyncedStoreClass, SyncedStoreIdentifier } from './synced/syncedStore'
57
+ export * as Boundary from './boundary/boundary'
58
+ // TS2742: direct exports keep boundary state types nameable.
55
59
  export type {
56
- BoundaryErrored,
57
- BoundaryPending,
58
- BoundaryReady,
59
- BoundaryState,
60
- } from "./boundary/boundary";
61
- export * as Procedure from "./procedure/procedure";
62
- export * as Channel from "./channel/channel";
63
- export * as Namespace from "./namespace/namespace";
64
- export type { FeatureNamespace } from "./namespace/namespace";
60
+ BoundaryErrored,
61
+ BoundaryPending,
62
+ BoundaryReady,
63
+ BoundaryState,
64
+ BoundaryStore,
65
+ } from './boundary/boundary'
65
66
 
66
- export * as Composition from "./compose/composition";
67
- export type {
68
- CompositionClass,
69
- CompositionService,
70
- Frame,
71
- RenderEnv,
72
- } from "./compose/composition";
73
- export {
74
- absent,
75
- each,
76
- type EachFill,
77
- isStructure,
78
- mount,
79
- one,
80
- type OneFill,
81
- type AbsentFill,
82
- type SlotFill,
83
- type Structure,
84
- structureEquals,
85
- type StructureSlots,
86
- StructureTypeId,
87
- when,
88
- } from "./compose/structure";
89
- export { Props } from "./compose/props";
90
- export {
91
- isSlot,
92
- type Node,
93
- slot,
94
- type SlotClass,
95
- type SlotInstance,
96
- type SlotProps,
97
- SlotTypeId,
98
- } from "./compose/slot";
99
- export { type SlotRenderer } from "./compose/host";
100
- export * as Ui from "./compose/ui";
101
- export {
102
- type DerivedContract,
103
- isUi,
104
- type MadeView,
105
- ui,
106
- type UiClass,
107
- type UiContract,
108
- type UiManifest,
109
- UiTypeId,
110
- UiViewContract,
111
- type ViewImpl,
112
- type WireSchemas,
113
- type WiredUi,
114
- type WiredUiManifest,
115
- } from "./compose/ui";
116
- export { provide } from "./compose/provide";
117
- export type { Trigger } from "./ui/trigger";
67
+ export * as Procedure from './procedure/procedure'
68
+ export type { ProcedureClass, ProcedureConfig } from './procedure/procedure'
69
+ export * as Channel from './channel/channel'
70
+ export type { ChannelClass, ChannelPolicy } from './channel/channel'
71
+ export * as Namespace from './namespace/namespace'
72
+ export type { FeatureNamespace } from './namespace/namespace'
118
73
 
119
- export * as Wire from "./wire/tree";
120
- export type { WireNode, WirePatch, WireProp, WireTree } from "./wire/tree";
74
+ export * as Composition from './compose/composition'
75
+ export { liveScoped } from './compose/composition'
76
+ export type {
77
+ CompositionActivation,
78
+ CompositionClass,
79
+ CompositionId,
80
+ CompositionService,
81
+ Frame,
82
+ RenderEnv,
83
+ ScopedCompositionLiveConfig,
84
+ } from './compose/composition'
85
+ export {
86
+ absent,
87
+ type AbsentFill,
88
+ each,
89
+ type EachFill,
90
+ isStructure,
91
+ mount,
92
+ one,
93
+ type OneFill,
94
+ type SlotFill,
95
+ type Structure,
96
+ structureEquals,
97
+ type StructureSlots,
98
+ when,
99
+ } from './compose/structure'
100
+ export { Props } from './compose/props'
101
+ export {
102
+ type CompositionOfSlotTarget,
103
+ type ContractOfSlotTarget,
104
+ type FeatureSlotTarget,
105
+ isSlot,
106
+ type Node,
107
+ type PropsOfSlotTarget,
108
+ slot,
109
+ type SlotClass,
110
+ type SlotComposition,
111
+ type SlotContract,
112
+ type SlotInstance,
113
+ type SlotProps,
114
+ type SlotService,
115
+ type SlotTarget,
116
+ type TargetOfSlot,
117
+ } from './compose/slot'
118
+ export * as Ui from './compose/ui'
119
+ export {
120
+ type CallableView,
121
+ type DerivedContract,
122
+ isUi,
123
+ type MadeView,
124
+ ui,
125
+ type UiClass,
126
+ type UiContract,
127
+ type UiService,
128
+ UiViewContract,
129
+ type ViewImpl,
130
+ } from './compose/ui'
131
+ export { provide, provideExisting, provideMergeExact } from './compose/provide'
132
+ export type { Trigger } from './ui/trigger'
121
133
 
122
- export * as Triggers from "./wire/triggers";
123
- export {
124
- TriggerRegistry,
125
- type TriggerHandle,
126
- type TriggerRegistryApi,
127
- UnknownTrigger,
128
- } from "./wire/triggers";
134
+ export * as Feature from './feature/feature'
135
+ export {
136
+ type EagerFeatureClass,
137
+ type FailedProps,
138
+ type FeatureClass,
139
+ featureModule,
140
+ type FeatureModule,
141
+ type FeatureModuleInput,
142
+ isFeature,
143
+ isFeatureBinding,
144
+ lazyImport,
145
+ type LazyFeatureClass,
146
+ type Placeholders,
147
+ } from './feature/feature'
129
148
 
130
- export * as Feature from "./feature/feature";
131
149
  export {
132
- type EngineServices,
133
- type FailedProps,
134
- type FeatureBinding,
135
- FeatureBindingTypeId,
136
- type FeatureClass,
137
- type FeatureRequirement,
138
- type FeatureManifest,
139
- featureModule,
140
- featureModuleFromInput,
141
- FeatureInput,
142
- type FeatureModule,
143
- type EagerFeatureClass,
144
- isFeature,
145
- isFeatureBinding,
146
- lazyImport,
147
- type LazyFeatureClass,
148
- type LoadedModule,
149
- mountFeature,
150
- type Placeholders,
151
- type ProvidedBy,
152
- type RequireCarrier,
153
- } from "./feature/feature";
154
- export { type SlotChild } from "./compose/slot";
150
+ type CapturedScene,
151
+ featureScene,
152
+ type FeatureSceneConfig,
153
+ isScene,
154
+ type MountedServices,
155
+ profiledScene,
156
+ type Scene,
157
+ scene,
158
+ sceneInstrumentation,
159
+ seedScene,
160
+ } from './scene/scene'
155
161
 
156
- export {
157
- isScene,
158
- type MountedServices,
159
- profiledScene,
160
- type Scene,
161
- type FeatureSceneConfig,
162
- featureScene,
163
- scene,
164
- sceneInstrumentation,
165
- seedScene,
166
- } from "./scene/scene";
167
- export type { SeedsOf } from "./state/stateGroup";
168
-
169
- export {
170
- Bus,
171
- busLayer,
172
- type Envelope,
173
- type Priority,
174
- publish,
175
- type Tagged,
176
- } from "./runtime/bus";
177
- export {
178
- type AppRuntime,
179
- type FeatureMountHandlers,
180
- makeAppRuntime,
181
- type RuntimeHandle,
182
- } from "./runtime/appRuntime";
183
- export {
184
- Engine,
185
- type ReducerEntry,
186
- Reducers,
187
- reducersLayer,
188
- } from "./runtime/loop";
189
- export {
190
- CurrentEventBudget,
191
- defaultEventBudget,
192
- type EventBudget,
193
- type ReformOptions,
194
- resolveEventBudget,
195
- } from "./runtime/eventBudget";
196
- export {
197
- CurrentInstrumentation,
198
- type Instrumentation,
199
- noopInstrumentation,
200
- resolveInstrumentation,
201
- type SpanEnd,
202
- } from "./runtime/instrumentation";
203
- export {
204
- Queries,
205
- queriesLayer,
206
- type QueryHandle,
207
- type QueryRegistry,
208
- } from "./runtime/queries";
209
- export {
210
- type ChannelClass,
211
- type ChannelPolicy,
212
- type ChannelRuntime,
213
- Channels,
214
- channelsLayer,
215
- type ProcedureEntry,
216
- Procedures,
217
- proceduresLayer,
218
- } from "./channel/channel";
219
- export {
220
- CurrentTracker,
221
- type Subscribable,
222
- type Tracker,
223
- } from "./internal/track";
224
- export {
225
- CaptureSink,
226
- type CaptureSinkApi,
227
- type UiCapture,
228
- } from "./internal/capture";
229
- export {
230
- AsyncReducer,
231
- AsyncSceneLayer,
232
- DuplicateRegistration,
233
- EventLoopOverflow,
234
- FeatureLoadFailed,
235
- forceSync,
236
- InvalidProvideTarget,
237
- UnknownGroupState,
238
- } from "./internal/errors";
239
- export {
240
- defaultScheduler,
241
- makeScheduler,
242
- Notifications,
243
- notificationsLayer,
244
- resolveScheduler,
245
- type Scheduler,
246
- } from "./internal/scheduler";
247
- export { makeStore, type Store } from "./internal/store";
248
- export type { FamilyStore } from "./state/stateFamily";
249
- export {
250
- type Kind,
251
- type Manifest,
252
- yieldableClass,
253
- } from "./definition/definition";
254
- export { readTracked } from "./internal/track";
255
- export { sameKey, wireSources, type WiredSources } from "./internal/sources";
162
+ export { type Priority, publish } from './runtime/bus'
163
+ export {
164
+ type AppRuntime,
165
+ type FeatureMountHandlers,
166
+ makeAppRuntime,
167
+ type RuntimeFeatureAvailability,
168
+ type RuntimeHandle,
169
+ } from './runtime/appRuntime'
170
+ export { Engine } from './runtime/loop'
171
+ export type { EventBudget, ReformOptions } from './runtime/eventBudget'
172
+ export {
173
+ AsyncReducer,
174
+ AsyncSceneLayer,
175
+ DuplicateRegistration,
176
+ EventLoopOverflow,
177
+ FeatureLoadFailed,
178
+ forceSync,
179
+ InvalidProvideTarget,
180
+ UnknownGroupState,
181
+ } from './internal/errors'
@@ -0,0 +1,39 @@
1
+ import { Option } from 'effect'
2
+
3
+ /**
4
+ * A read-through snapshot cache over a tag-indexed `Map<string, Set<T>>`.
5
+ *
6
+ * The registries keep mutable `Set` buckets so register/unregister stay O(1),
7
+ * but the dispatch loop must iterate a *snapshot*: an entry registered while a
8
+ * frame is folding must not join the fold already in flight (`Set` iteration is
9
+ * live, an array copy is not). Copying per event would pay that snapshot on
10
+ * every dispatch, so the copy is cached and dropped only when the bucket
11
+ * actually changes — registration is rare, dispatch is not.
12
+ *
13
+ * A tag with no bucket returns a shared empty array and is never cached, so
14
+ * events nothing handles allocate nothing and cannot grow the cache.
15
+ */
16
+ export interface BucketCache<T> {
17
+ readonly read: (tag: string) => ReadonlyArray<T>
18
+ readonly invalidate: (tag: string) => void
19
+ }
20
+
21
+ export const makeBucketCache = <T>(source: Map<string, Set<T>>): BucketCache<T> => {
22
+ const empty: ReadonlyArray<T> = []
23
+ const cache = new Map<string, ReadonlyArray<T>>()
24
+ const build = (tag: string): ReadonlyArray<T> =>
25
+ Option.match(Option.fromNullable(source.get(tag)), {
26
+ onNone: (): ReadonlyArray<T> => empty,
27
+ onSome: (bucket) => {
28
+ const current: ReadonlyArray<T> = Array.from(bucket)
29
+ cache.set(tag, current)
30
+ return current
31
+ },
32
+ })
33
+ return {
34
+ read: (tag) => Option.getOrElse(Option.fromNullable(cache.get(tag)), () => build(tag)),
35
+ invalidate: (tag) => {
36
+ cache.delete(tag)
37
+ },
38
+ }
39
+ }
@@ -1,7 +1,7 @@
1
1
  import { Context } from 'effect'
2
2
  import type { Trigger } from '../ui/trigger'
3
3
 
4
- export interface UiCapture {
4
+ export interface CapturedRender {
5
5
  readonly name: string
6
6
  readonly props: unknown
7
7
  readonly events: Record<string, Trigger<unknown>>
@@ -9,11 +9,16 @@ export interface UiCapture {
9
9
  readonly key?: string
10
10
  }
11
11
 
12
+ export type UiCapture = CapturedRender
13
+
12
14
  export interface CaptureSinkApi {
13
- record(capture: UiCapture): void
15
+ record(capture: CapturedRender): void
14
16
  }
15
17
 
16
- const CaptureSinkBase: Context.TagClass<CaptureSink, 'reform/internal/CaptureSink', CaptureSinkApi> =
17
- Context.Tag('reform/internal/CaptureSink')<CaptureSink, CaptureSinkApi>()
18
+ const CaptureSinkBase: Context.TagClass<
19
+ CaptureSink,
20
+ 'reform/internal/CaptureSink',
21
+ CaptureSinkApi
22
+ > = Context.Tag('reform/internal/CaptureSink')<CaptureSink, CaptureSinkApi>()
18
23
 
19
24
  export class CaptureSink extends CaptureSinkBase {}
@@ -1,6 +1,4 @@
1
- declare const process:
2
- | { readonly env: { readonly NODE_ENV: string | undefined } }
3
- | undefined
1
+ declare const process: { readonly env: { readonly NODE_ENV: string | undefined } } | undefined
4
2
 
5
3
  export const isDev: boolean =
6
4
  typeof process === 'undefined' ||
@@ -4,7 +4,9 @@ type TaggedErrorClass<Tag extends string, A extends Record<string, unknown>> = n
4
4
  args: A,
5
5
  ) => Cause.YieldableError & { readonly _tag: Tag } & Readonly<A>
6
6
 
7
- type EmptyTaggedErrorClass<Tag extends string> = new () => Cause.YieldableError & { readonly _tag: Tag }
7
+ type EmptyTaggedErrorClass<Tag extends string> = new () => Cause.YieldableError & {
8
+ readonly _tag: Tag
9
+ }
8
10
 
9
11
  const InvalidProvideTargetBase: EmptyTaggedErrorClass<'reform/InvalidProvideTarget'> =
10
12
  Data.TaggedError('reform/InvalidProvideTarget')<{}>
@@ -15,8 +17,10 @@ export class InvalidProvideTarget extends InvalidProvideTargetBase {
15
17
  }
16
18
  }
17
19
 
18
- const UnknownGroupStateBase: TaggedErrorClass<'reform/UnknownGroupState', { readonly name: string }> =
19
- Data.TaggedError('reform/UnknownGroupState')<{ readonly name: string }>
20
+ const UnknownGroupStateBase: TaggedErrorClass<
21
+ 'reform/UnknownGroupState',
22
+ { readonly name: string }
23
+ > = Data.TaggedError('reform/UnknownGroupState')<{ readonly name: string }>
20
24
 
21
25
  export class UnknownGroupState extends UnknownGroupStateBase {
22
26
  override get message(): string {
@@ -24,8 +28,10 @@ export class UnknownGroupState extends UnknownGroupStateBase {
24
28
  }
25
29
  }
26
30
 
27
- const FeatureLoadFailedBase: TaggedErrorClass<'reform/FeatureLoadFailed', { readonly cause: unknown }> =
28
- Data.TaggedError('reform/FeatureLoadFailed')<{ readonly cause: unknown }>
31
+ const FeatureLoadFailedBase: TaggedErrorClass<
32
+ 'reform/FeatureLoadFailed',
33
+ { readonly cause: unknown }
34
+ > = Data.TaggedError('reform/FeatureLoadFailed')<{ readonly cause: unknown }>
29
35
 
30
36
  export class FeatureLoadFailed extends FeatureLoadFailedBase {
31
37
  override get message(): string {
@@ -33,8 +39,9 @@ export class FeatureLoadFailed extends FeatureLoadFailedBase {
33
39
  }
34
40
  }
35
41
 
36
- const AsyncReducerBase: EmptyTaggedErrorClass<'reform/AsyncReducer'> =
37
- Data.TaggedError('reform/AsyncReducer')<{}>
42
+ const AsyncReducerBase: EmptyTaggedErrorClass<'reform/AsyncReducer'> = Data.TaggedError(
43
+ 'reform/AsyncReducer',
44
+ )<{}>
38
45
 
39
46
  export class AsyncReducer extends AsyncReducerBase {
40
47
  override get message(): string {
@@ -42,8 +49,9 @@ export class AsyncReducer extends AsyncReducerBase {
42
49
  }
43
50
  }
44
51
 
45
- const AsyncSceneLayerBase: EmptyTaggedErrorClass<'reform/AsyncSceneLayer'> =
46
- Data.TaggedError('reform/AsyncSceneLayer')<{}>
52
+ const AsyncSceneLayerBase: EmptyTaggedErrorClass<'reform/AsyncSceneLayer'> = Data.TaggedError(
53
+ 'reform/AsyncSceneLayer',
54
+ )<{}>
47
55
 
48
56
  export class AsyncSceneLayer extends AsyncSceneLayerBase {
49
57
  override get message(): string {
@@ -81,7 +89,10 @@ export const forceSync = <A>(thunk: () => A): A => {
81
89
  const DuplicateRegistrationBase: TaggedErrorClass<
82
90
  'reform/DuplicateRegistration',
83
91
  { readonly kind: string; readonly name: string }
84
- > = Data.TaggedError('reform/DuplicateRegistration')<{ readonly kind: string; readonly name: string }>
92
+ > = Data.TaggedError('reform/DuplicateRegistration')<{
93
+ readonly kind: string
94
+ readonly name: string
95
+ }>
85
96
 
86
97
  export class DuplicateRegistration extends DuplicateRegistrationBase {
87
98
  override get message(): string {