foldkit 0.160.0 → 0.161.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.
- package/dist/calendar/index.d.ts +1 -1
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/index.js +1 -1
- package/dist/calendar/locale.d.ts +219 -10
- package/dist/calendar/locale.d.ts.map +1 -1
- package/dist/calendar/locale.js +166 -82
- package/dist/calendar/public.d.ts +1 -1
- package/dist/calendar/public.d.ts.map +1 -1
- package/dist/calendar/public.js +1 -1
- package/dist/command/index.d.ts +9 -12
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +9 -12
- package/dist/devTools/protocol.d.ts +9 -1
- package/dist/devTools/protocol.d.ts.map +1 -1
- package/dist/devTools/protocol.js +2 -1
- package/dist/devTools/serialize.d.ts.map +1 -1
- package/dist/devTools/serialize.js +1 -0
- package/dist/devTools/store.d.ts +3 -0
- package/dist/devTools/store.d.ts.map +1 -1
- package/dist/devTools/store.js +24 -0
- package/dist/dom/dialogRuntime.d.ts +9 -0
- package/dist/dom/dialogRuntime.d.ts.map +1 -0
- package/dist/dom/dialogRuntime.js +3 -0
- package/dist/dom/dom.d.ts +22 -11
- package/dist/dom/dom.d.ts.map +1 -1
- package/dist/dom/dom.js +196 -18
- package/dist/dom/inert.d.ts +9 -0
- package/dist/dom/inert.d.ts.map +1 -1
- package/dist/dom/inert.js +74 -2
- package/dist/managedResource/managedResource.d.ts +44 -2
- package/dist/managedResource/managedResource.d.ts.map +1 -1
- package/dist/managedResource/managedResource.js +40 -10
- package/dist/runtime/devToolsIntegration.d.ts +8 -3
- package/dist/runtime/devToolsIntegration.d.ts.map +1 -1
- package/dist/runtime/devToolsIntegration.js +20 -3
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +54 -12
- package/dist/subscription/fromEvent.d.ts +103 -28
- package/dist/subscription/fromEvent.d.ts.map +1 -1
- package/dist/subscription/fromEvent.js +48 -27
- package/dist/subscription/keyboardShortcuts.d.ts +110 -0
- package/dist/subscription/keyboardShortcuts.d.ts.map +1 -0
- package/dist/subscription/keyboardShortcuts.js +444 -0
- package/dist/subscription/public.d.ts +3 -1
- package/dist/subscription/public.d.ts.map +1 -1
- package/dist/subscription/public.js +1 -0
- package/dist/subscription/subscription.d.ts +61 -1
- package/dist/subscription/subscription.d.ts.map +1 -1
- package/dist/subscription/subscription.js +51 -8
- package/dist/update/public.d.ts +1 -1
- package/dist/update/public.d.ts.map +1 -1
- package/dist/update/public.js +1 -1
- package/dist/update/update.d.ts +189 -1
- package/dist/update/update.d.ts.map +1 -1
- package/dist/update/update.js +178 -16
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/subscription/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/subscription/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,MAAM,EAEN,MAAM,EACN,MAAM,EAEP,MAAM,QAAQ,CAAA;AAEf,KAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAA;CAC/B,CAAA;AAED,KAAK,kBAAkB,CAAC,YAAY,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG;IACpE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAA;CACtC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,IAAI;IAC1E,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;IAC7D,QAAQ,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,YAAY,CAAA;IAC5D,QAAQ,CAAC,oBAAoB,CAAC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AY,GAAG,iBAAiB,CAAC,YAAY,CAAC,EAC9C,QAAQ,CACT,GACD,YAAY,CACV,WAAW,EACX,aAAa,EACb,iBAAiB,CAAC,YAAY,CAAC,EAC/B,QAAQ,CACT,GACH,YAAY,CAAC,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,CAAC,GAClE,KAAK;CACV,CAAA;AA6HD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,eAAO,MAAM,IAAI,GAEb,aAAa,SAAS,QAAQ,CAC5B,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CACjD,iBAEc,aAAa,KAC3B;IACD,CAAC,WAAW,EAAE,aAAa,EACzB,MAAM,EAAE,eAAe,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,GACjE,wBAAwB,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,CAAA;IACtE,CACE,WAAW,EACX,aAAa,EACb,KAAK,SAAS,UAAU,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,UAAU,CAC/D,WAAW,EACX,aAAa,CACd,EAED,MAAM,EAAE,uBAAuB,CAC7B,WAAW,EACX,aAAa,EACb,aAAa,EACb,KAAK,CACN,GACA,gCAAgC,CACjC,WAAW,EACX,aAAa,EACb,aAAa,EACb,KAAK,CACN,CAAA;IACD,CAAC,WAAW,EAAE,aAAa,EACzB,MAAM,EAAE,UAAU,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,GAC5D,mBAAmB,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,CAAA;CASzD,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Option, Record, Schema, Stream, pipe } from 'effect';
|
|
1
|
+
import { Array, Option, Record, Schema, Stream, pipe, } from 'effect';
|
|
2
2
|
/**
|
|
3
3
|
* Declares a Subscriptions record. The Model, Message, and optional Services
|
|
4
4
|
* generics are provided up front; the entries record follows, built from
|
|
@@ -31,23 +31,66 @@ export const make = () => (build) => {
|
|
|
31
31
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
32
32
|
return build(entryBuilder);
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
* Combines multiple Subscriptions records into one. Throws on duplicate
|
|
36
|
-
* keys so a misconfigured aggregate fails loudly at startup rather than
|
|
37
|
-
* silently overriding.
|
|
38
|
-
*/
|
|
39
|
-
export const aggregate = () => (...records) => {
|
|
34
|
+
const mergeSubscriptions = (records) => {
|
|
40
35
|
const result = {};
|
|
41
36
|
for (const record of records) {
|
|
42
37
|
for (const key of Object.keys(record)) {
|
|
43
38
|
if (Object.hasOwn(result, key)) {
|
|
44
39
|
throw new Error(`Subscription.aggregate: duplicate key "${key}" across records`);
|
|
45
40
|
}
|
|
46
|
-
result
|
|
41
|
+
Object.defineProperty(result, key, {
|
|
42
|
+
configurable: true,
|
|
43
|
+
enumerable: true,
|
|
44
|
+
value: record[key],
|
|
45
|
+
writable: true,
|
|
46
|
+
});
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return result;
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Combines multiple Subscriptions records into one. Throws on duplicate
|
|
53
|
+
* keys so a misconfigured aggregate fails loudly at startup rather than
|
|
54
|
+
* silently overriding.
|
|
55
|
+
*
|
|
56
|
+
* Pass the records directly and the Model, Message, and Services are read
|
|
57
|
+
* off them. The Model of the first record with a Model dependency is the one
|
|
58
|
+
* every later record is checked against, so a record from another Model
|
|
59
|
+
* universe fails at its own argument position. Message and Services widen to
|
|
60
|
+
* the union across all records, which is what lets a record that needs an
|
|
61
|
+
* Effect service sit beside records that need none.
|
|
62
|
+
*
|
|
63
|
+
* The result keeps each record's keys and each entry's exact dependency type,
|
|
64
|
+
* schema, and `keepAliveEquivalence` variant, so a lifted entry's
|
|
65
|
+
* {@link GatedDependencies} survives aggregation.
|
|
66
|
+
*
|
|
67
|
+
* The curried form remains available for a record that has to be typed before
|
|
68
|
+
* its entries exist, such as a value annotated as
|
|
69
|
+
* `Subscriptions<Model, Message>` at a module boundary. It erases keys and
|
|
70
|
+
* per-entry dependency types, so reach for it only when the explicit contract
|
|
71
|
+
* is the point.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const subscriptions = Subscription.aggregate(
|
|
76
|
+
* homeSubscriptions,
|
|
77
|
+
* roomSubscriptions,
|
|
78
|
+
* )
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @example Curried, when the record is typed before its entries exist:
|
|
82
|
+
* ```ts
|
|
83
|
+
* export const subscriptions: Subscription.Subscriptions<Model, Message> =
|
|
84
|
+
* Subscription.aggregate<Model, Message>()(...records)
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export const aggregate = ((...records) => {
|
|
88
|
+
return Array.match(records, {
|
|
89
|
+
onEmpty: () => (...curriedRecords) => mergeSubscriptions(curriedRecords),
|
|
90
|
+
onNonEmpty: mergeSubscriptions,
|
|
91
|
+
});
|
|
92
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
93
|
+
});
|
|
51
94
|
/**
|
|
52
95
|
* Wraps a Stream as a Subscription entry whose lifecycle is independent of
|
|
53
96
|
* the Model. The Stream runs for the lifetime of the Subscriptions record;
|
package/dist/update/public.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { combine, foldChild, foldChildStep, refresh, withOutMessage, } from './index.js';
|
|
1
|
+
export { combine, foldChild, foldChildInit, foldChildInits, foldChildStep, refresh, withOutMessage, } from './index.js';
|
|
2
2
|
export type { Commands, Return, ReturnWithOutMessage, Step, StepWithOutMessage, Refreshable, ChildFold, ChildFoldWithDerivedParentOutMessage, ChildFoldWithOutMessage, ChildFoldWithParentOutMessage, ChildStepFold, ChildStepFoldWithDerivedParentOutMessage, ChildStepFoldWithOutMessage, ChildStepFoldWithParentOutMessage, FoldContext, Fold, FoldWithOutMessage, } from './index.js';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/update/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,SAAS,EACT,aAAa,EACb,OAAO,EACP,cAAc,GACf,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,QAAQ,EACR,MAAM,EACN,oBAAoB,EACpB,IAAI,EACJ,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,oCAAoC,EACpC,uBAAuB,EACvB,6BAA6B,EAC7B,aAAa,EACb,wCAAwC,EACxC,2BAA2B,EAC3B,iCAAiC,EACjC,WAAW,EACX,IAAI,EACJ,kBAAkB,GACnB,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/update/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,SAAS,EACT,aAAa,EACb,cAAc,EACd,aAAa,EACb,OAAO,EACP,cAAc,GACf,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,QAAQ,EACR,MAAM,EACN,oBAAoB,EACpB,IAAI,EACJ,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,oCAAoC,EACpC,uBAAuB,EACvB,6BAA6B,EAC7B,aAAa,EACb,wCAAwC,EACxC,2BAA2B,EAC3B,iCAAiC,EACjC,WAAW,EACX,IAAI,EACJ,kBAAkB,GACnB,MAAM,YAAY,CAAA"}
|
package/dist/update/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { combine, foldChild, foldChildStep, refresh, withOutMessage, } from './index.js';
|
|
1
|
+
export { combine, foldChild, foldChildInit, foldChildInits, foldChildStep, refresh, withOutMessage, } from './index.js';
|
package/dist/update/update.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Option } from 'effect';
|
|
1
|
+
import { type Effect, Option } from 'effect';
|
|
2
2
|
import { type AsyncData } from '../asyncData/index.js';
|
|
3
3
|
import { type Command } from '../command/index.js';
|
|
4
4
|
/** The Commands collection an update return may include. The collection keeps
|
|
@@ -262,6 +262,11 @@ export type ChildFoldWithParentOutMessage<ParentModel, ParentMessage, ChildModel
|
|
|
262
262
|
toParentOutMessage: (outMessage: ChildOutMessage) => ParentOutMessage | undefined;
|
|
263
263
|
foldOutMessage?: (outMessage: ChildOutMessage, context: FoldContext<ChildMessage, ParentMessage>) => StepWithOutMessage<NoInfer<ParentModel>, OutMessageStepMessage, DerivedParentOutMessage, OutMessageStepRequirements>;
|
|
264
264
|
}>;
|
|
265
|
+
type AnyUpdateReturn = Readonly<{
|
|
266
|
+
model: any;
|
|
267
|
+
commands?: Commands<any, any>;
|
|
268
|
+
outMessage?: any;
|
|
269
|
+
}>;
|
|
265
270
|
/** The dual function {@link foldChild} returns. Data-first runs the
|
|
266
271
|
* fold now (`fold(model, input)` returns a {@link Return}); data-last
|
|
267
272
|
* builds a composable {@link Step} (`fold(input)`, for
|
|
@@ -443,4 +448,187 @@ export declare const foldChildStep: {
|
|
|
443
448
|
<ParentModel, ParentMessage, ChildModel, ChildMessage, ChildOutMessage, ParentOutMessage, ChildRequirements = never, OutMessageStepRequirements = ChildRequirements, OutMessageStepMessage = ParentMessage>(childFold: ChildStepFoldWithDerivedParentOutMessage<ParentModel, ParentMessage, ChildModel, ChildMessage, ChildOutMessage, ParentOutMessage, ChildRequirements, OutMessageStepRequirements, OutMessageStepMessage>): StepWithOutMessage<ParentModel, ParentMessage | OutMessageStepMessage, ParentOutMessage, ChildRequirements | OutMessageStepRequirements>;
|
|
444
449
|
<ParentModel, ParentMessage, ChildModel, ChildMessage, R = never>(childFold: ChildStepFold<ParentModel, ParentMessage, ChildModel, ChildMessage, R>): Step<ParentModel, ParentMessage, R>;
|
|
445
450
|
};
|
|
451
|
+
/** Builds a parent Model from a child's init or boot result, lifts the child's
|
|
452
|
+
* Commands through `toParentMessage`, and handles any child OutMessage.
|
|
453
|
+
* Call it data-first with the completed child result and the parent adapters.
|
|
454
|
+
*
|
|
455
|
+
* `toParentModel` constructs the complete parent Model before `foldOutMessage`
|
|
456
|
+
* runs. The fold receives the same {@link FoldContext} as {@link foldChild},
|
|
457
|
+
* and its Commands follow the mapped child Commands. The returned Message
|
|
458
|
+
* and service requirements include both the child's mapped Commands and the
|
|
459
|
+
* OutMessage Step's Commands.
|
|
460
|
+
*
|
|
461
|
+
* For example, a parent can initialize a search Submodel that requests its
|
|
462
|
+
* first query during boot:
|
|
463
|
+
*
|
|
464
|
+
* ```ts
|
|
465
|
+
* const foldSearchOutMessage = Search.OutMessage.match<Update.Step<Model, Message>>({
|
|
466
|
+
* RequestedSearch: ({ query }) => model => ({
|
|
467
|
+
* model: evo(model, { results: () => AsyncData.Loading() }),
|
|
468
|
+
* commands: [FetchResults({ query })],
|
|
469
|
+
* }),
|
|
470
|
+
* })
|
|
471
|
+
*
|
|
472
|
+
* const init = (): Update.Return<Model, Message> =>
|
|
473
|
+
* Update.foldChildInit(Search.boot({ query: '' }), {
|
|
474
|
+
* toParentModel: search => Model.make({ search, results: AsyncData.Idle() }),
|
|
475
|
+
* toParentMessage: toGotSearchMessage,
|
|
476
|
+
* foldOutMessage: foldSearchOutMessage,
|
|
477
|
+
* })
|
|
478
|
+
* ```
|
|
479
|
+
*
|
|
480
|
+
* A child result that can emit an OutMessage requires `foldOutMessage` or
|
|
481
|
+
* `toParentOutMessage`. A local fold returning {@link Step} produces a plain
|
|
482
|
+
* {@link Return}; a fold returning {@link StepWithOutMessage} produces a
|
|
483
|
+
* {@link ReturnWithOutMessage}. Add `toParentOutMessage` to forward child
|
|
484
|
+
* OutMessages, optionally alongside local handling. A derived OutMessage
|
|
485
|
+
* replaces the forwarded one. When the child emits nothing, neither adapter
|
|
486
|
+
* runs and the result omits `outMessage`.
|
|
487
|
+
*/
|
|
488
|
+
export declare const foldChildInit: {
|
|
489
|
+
<ParentModel, ParentMessage, ChildModel, ChildMessage, ChildOutMessage, ParentOutMessage, ChildRequirements = never, OutMessageStepRequirements = ChildRequirements, OutMessageStepMessage = ParentMessage, DerivedParentOutMessage = ParentOutMessage>(childInit: ReturnWithOutMessage<ChildModel, ChildMessage, ChildOutMessage, ChildRequirements>, childFold: Readonly<{
|
|
490
|
+
toParentModel: (childModel: ChildModel) => ParentModel;
|
|
491
|
+
toParentMessage: (message: ChildMessage) => ParentMessage;
|
|
492
|
+
toParentOutMessage: (outMessage: ChildOutMessage) => ParentOutMessage | undefined;
|
|
493
|
+
foldOutMessage?: (outMessage: ChildOutMessage, context: FoldContext<ChildMessage, ParentMessage>) => StepWithOutMessage<ParentModel, OutMessageStepMessage, DerivedParentOutMessage, OutMessageStepRequirements>;
|
|
494
|
+
}>): ReturnWithOutMessage<ParentModel, ParentMessage | OutMessageStepMessage, ParentOutMessage | DerivedParentOutMessage, ChildRequirements | OutMessageStepRequirements>;
|
|
495
|
+
<ParentModel, ParentMessage, ChildModel, ChildMessage, ChildOutMessage, ChildRequirements = never, OutMessageStepRequirements = ChildRequirements, OutMessageStepMessage = ParentMessage>(childInit: ReturnWithOutMessage<ChildModel, ChildMessage, ChildOutMessage, ChildRequirements>, childFold: Readonly<{
|
|
496
|
+
toParentModel: (childModel: ChildModel) => ParentModel;
|
|
497
|
+
toParentMessage: (message: ChildMessage) => ParentMessage;
|
|
498
|
+
foldOutMessage: (outMessage: ChildOutMessage, context: FoldContext<ChildMessage, ParentMessage>) => Step<ParentModel, OutMessageStepMessage, OutMessageStepRequirements>;
|
|
499
|
+
}>): Return<ParentModel, ParentMessage | OutMessageStepMessage, ChildRequirements | OutMessageStepRequirements>;
|
|
500
|
+
<ParentModel, ParentMessage, ChildModel, ChildMessage, ChildOutMessage, ParentOutMessage, ChildRequirements = never, OutMessageStepRequirements = ChildRequirements, OutMessageStepMessage = ParentMessage>(childInit: ReturnWithOutMessage<ChildModel, ChildMessage, ChildOutMessage, ChildRequirements>, childFold: Readonly<{
|
|
501
|
+
toParentModel: (childModel: ChildModel) => ParentModel;
|
|
502
|
+
toParentMessage: (message: ChildMessage) => ParentMessage;
|
|
503
|
+
toParentOutMessage?: never;
|
|
504
|
+
foldOutMessage: (outMessage: ChildOutMessage, context: FoldContext<ChildMessage, ParentMessage>) => StepWithOutMessage<ParentModel, OutMessageStepMessage, ParentOutMessage, OutMessageStepRequirements>;
|
|
505
|
+
}>): ReturnWithOutMessage<ParentModel, ParentMessage | OutMessageStepMessage, ParentOutMessage, ChildRequirements | OutMessageStepRequirements>;
|
|
506
|
+
<ParentModel, ParentMessage, ChildModel, ChildMessage, R = never>(childInit: Return<ChildModel, ChildMessage, R>, childFold: Readonly<{
|
|
507
|
+
toParentModel: (childModel: ChildModel) => ParentModel;
|
|
508
|
+
toParentMessage: (message: ChildMessage) => ParentMessage;
|
|
509
|
+
}>): Return<ParentModel, ParentMessage, R>;
|
|
510
|
+
};
|
|
511
|
+
type InitCommandEffects<Init> = Init extends {
|
|
512
|
+
commands?: infer ChildCommands;
|
|
513
|
+
} ? NonNullable<ChildCommands> extends ReadonlyArray<infer ChildCommand> ? ChildCommand extends {
|
|
514
|
+
effect: infer CommandEffect;
|
|
515
|
+
} ? CommandEffect : never : never : never;
|
|
516
|
+
type InitOutMessage<Init> = Init extends {
|
|
517
|
+
outMessage?: infer OutMessage;
|
|
518
|
+
} ? Exclude<OutMessage, undefined> : never;
|
|
519
|
+
type InitFoldReturn<Fold> = Fold extends {
|
|
520
|
+
foldOutMessage?: (...args: any) => (...args: any) => infer FoldReturn;
|
|
521
|
+
} ? FoldReturn : never;
|
|
522
|
+
type InitMappedMessage<Fold> = Fold extends {
|
|
523
|
+
toParentMessage: (...args: any) => infer ParentMessage;
|
|
524
|
+
} ? ParentMessage : never;
|
|
525
|
+
type InitForwardedOutMessage<Fold> = Fold extends {
|
|
526
|
+
toParentOutMessage?: (...args: any) => infer ParentOutMessage;
|
|
527
|
+
} ? Exclude<ParentOutMessage, undefined> : never;
|
|
528
|
+
type InitParentOutMessage<Fold> = InitForwardedOutMessage<Fold> | InitOutMessage<InitFoldReturn<Fold>>;
|
|
529
|
+
type InitMessages<Folds> = InitMappedMessage<Folds[keyof Folds]> | Effect.Success<InitCommandEffects<InitFoldReturn<Folds[keyof Folds]>>>;
|
|
530
|
+
type InitRequirements<ChildInits, Folds> = Effect.Services<InitCommandEffects<ChildInits[keyof ChildInits]>> | Effect.Services<InitCommandEffects<InitFoldReturn<Folds[keyof Folds]>>>;
|
|
531
|
+
type InitOutMessages<Folds> = {
|
|
532
|
+
readonly [Key in keyof Folds]?: InitParentOutMessage<Folds[Key]>;
|
|
533
|
+
};
|
|
534
|
+
type InitFold<ChildInit, ParentModel> = Readonly<{
|
|
535
|
+
toParentMessage: (message: Effect.Success<InitCommandEffects<ChildInit>>) => unknown;
|
|
536
|
+
foldOutMessage?(outMessage: InitOutMessage<ChildInit>, context: FoldContext<Effect.Success<InitCommandEffects<ChildInit>>, unknown>): StepWithOutMessage<ParentModel, any, any, any>;
|
|
537
|
+
toParentOutMessage?: (outMessage: InitOutMessage<ChildInit>) => any;
|
|
538
|
+
}>;
|
|
539
|
+
type InitFoldValidation<ChildInit, ParentModel, Fold> = unknown extends Fold ? unknown : ([InitOutMessage<ChildInit>] extends [never] ? unknown : Fold extends {
|
|
540
|
+
foldOutMessage: (...args: any) => any;
|
|
541
|
+
} | {
|
|
542
|
+
toParentOutMessage: (...args: any) => any;
|
|
543
|
+
} ? unknown : never) & (Fold extends {
|
|
544
|
+
foldOutMessage?: infer OutMessageFold;
|
|
545
|
+
} ? NonNullable<OutMessageFold> extends (outMessage: InitOutMessage<ChildInit>, context: FoldContext<Effect.Success<InitCommandEffects<ChildInit>>, InitMappedMessage<Fold>>) => StepWithOutMessage<ParentModel, any, any, any> ? unknown : never : unknown);
|
|
546
|
+
type InitResolution<Folds> = unknown extends Folds[keyof Folds] ? unknown : [InitParentOutMessage<Folds[keyof Folds]>] extends [never] ? {
|
|
547
|
+
resolveOutMessage?: never;
|
|
548
|
+
} : {
|
|
549
|
+
resolveOutMessage: unknown;
|
|
550
|
+
};
|
|
551
|
+
/** Builds a complete parent Model from named child init or boot results before
|
|
552
|
+
* handling any of their OutMessages. Call this function data-first.
|
|
553
|
+
*
|
|
554
|
+
* `toParentModel` receives the record of child Models and runs exactly once.
|
|
555
|
+
* The `folds` record has the same keys as `childInits`. Each fold receives the
|
|
556
|
+
* Model produced by the preceding fold, so a change to another child is kept.
|
|
557
|
+
* Folds follow the record's own-key order: array-index keys first in numeric
|
|
558
|
+
* order, then other string keys in insertion order, then Symbols in insertion
|
|
559
|
+
* order.
|
|
560
|
+
* Prefer descriptive string keys to make that order visible at the call site.
|
|
561
|
+
*
|
|
562
|
+
* For example, a Workspace Submodel contains Search and Editor Submodels:
|
|
563
|
+
*
|
|
564
|
+
* ```ts
|
|
565
|
+
* const init = (): Update.Return<Model, Message> =>
|
|
566
|
+
* Update.foldChildInits(
|
|
567
|
+
* { search: Search.init(), editor: Editor.init() },
|
|
568
|
+
* {
|
|
569
|
+
* toParentModel: ({ search, editor }) => Model.make({ search, editor }),
|
|
570
|
+
* folds: {
|
|
571
|
+
* search: {
|
|
572
|
+
* toParentMessage: message => Message.GotSearchMessage({ message }),
|
|
573
|
+
* },
|
|
574
|
+
* editor: {
|
|
575
|
+
* toParentMessage: message => Message.GotEditorMessage({ message }),
|
|
576
|
+
* },
|
|
577
|
+
* },
|
|
578
|
+
* },
|
|
579
|
+
* )
|
|
580
|
+
* ```
|
|
581
|
+
*
|
|
582
|
+
* Add `foldOutMessage` to handle a child's OutMessage against the completed
|
|
583
|
+
* parent Model. The Editor fold also sees changes made by the Search fold.
|
|
584
|
+
* For each child, mapped child Commands precede Commands from its OutMessage
|
|
585
|
+
* fold. All Commands for that child precede the next child's Commands. Array
|
|
586
|
+
* order does not guarantee execution or completion order. Each fold receives
|
|
587
|
+
* its own {@link FoldContext}; Message and service requirement unions include
|
|
588
|
+
* every child and OutMessage Step. When using the context, annotate both
|
|
589
|
+
* handler parameters, for example `(outMessage: Search.OutMessage,
|
|
590
|
+
* context: Update.FoldContext<Search.Message, Message>)`. An unannotated
|
|
591
|
+
* context has an `unknown` parent Message. The annotated context is checked
|
|
592
|
+
* against the same entry's `toParentMessage`.
|
|
593
|
+
*
|
|
594
|
+
* Each entry supports the same local handling and forwarding as
|
|
595
|
+
* {@link foldChildInit}. A child that can emit an OutMessage requires
|
|
596
|
+
* `foldOutMessage` or `toParentOutMessage`. A derived parent OutMessage takes
|
|
597
|
+
* precedence over forwarding within that entry.
|
|
598
|
+
*
|
|
599
|
+
* TypeScript can leave an inline generic `match` adapter unresolved. Name the
|
|
600
|
+
* adapter or pass its output type explicitly to keep the exact Message,
|
|
601
|
+
* OutMessage, and service types. If an entry remains unresolved, the return
|
|
602
|
+
* keeps the parent Model type and widens those other types to `unknown` rather
|
|
603
|
+
* than incorrectly reporting `never`.
|
|
604
|
+
*
|
|
605
|
+
* If any entry can emit a parent OutMessage, supply `resolveOutMessage` to
|
|
606
|
+
* construct the single final OutMessage. It receives optional parent
|
|
607
|
+
* OutMessages under their child keys, followed by the final parent Model.
|
|
608
|
+
* For example, combine a restored query and a restored draft into one
|
|
609
|
+
* `RestoredWorkspace` OutMessage that preserves both results. Choosing one
|
|
610
|
+
* child's OutMessage discards the other and needs an application-specific
|
|
611
|
+
* reason. The resolver runs after all folds, only when at least one entry
|
|
612
|
+
* emitted an OutMessage. If the final Model alone contains everything needed,
|
|
613
|
+
* local folds followed by {@link withOutMessage} can report the parent result.
|
|
614
|
+
* Return `undefined` to emit nothing. Local-only folds return {@link Return};
|
|
615
|
+
* outward-capable folds return {@link ReturnWithOutMessage}. Absent child
|
|
616
|
+
* OutMessages skip their handlers, and absent final OutMessages omit the
|
|
617
|
+
* `outMessage` property.
|
|
618
|
+
*/
|
|
619
|
+
export declare const foldChildInits: <ChildInits extends Readonly<Record<PropertyKey, AnyUpdateReturn>>, ToParentModel extends (models: {
|
|
620
|
+
readonly [Key in keyof ChildInits]: ChildInits[Key]['model'];
|
|
621
|
+
}) => any, Folds extends {
|
|
622
|
+
readonly [Key in keyof ChildInits]: unknown;
|
|
623
|
+
}, ParentOutMessage = never>(childInits: ChildInits, configuration: Readonly<{
|
|
624
|
+
toParentModel: ToParentModel;
|
|
625
|
+
folds: Folds & {
|
|
626
|
+
readonly [Key in keyof ChildInits]: InitFold<ChildInits[Key], ReturnType<ToParentModel>>;
|
|
627
|
+
} & Record<Exclude<keyof Folds, keyof ChildInits>, never> & NoInfer<{
|
|
628
|
+
readonly [Key in keyof ChildInits]: InitFoldValidation<ChildInits[Key], ReturnType<ToParentModel>, Folds[Key]>;
|
|
629
|
+
}>;
|
|
630
|
+
}> & {
|
|
631
|
+
resolveOutMessage?: (outMessages: InitOutMessages<Folds>, model: ReturnType<ToParentModel>) => ParentOutMessage | undefined;
|
|
632
|
+
} & NoInfer<InitResolution<Folds>>) => unknown extends Folds[keyof Folds] ? ReturnWithOutMessage<ReturnType<ToParentModel>, unknown, unknown, unknown> : [InitParentOutMessage<Folds[keyof Folds]>] extends [never] ? Return<ReturnType<ToParentModel>, InitMessages<Folds>, InitRequirements<ChildInits, Folds>> : ReturnWithOutMessage<ReturnType<ToParentModel>, InitMessages<Folds>, ParentOutMessage, InitRequirements<ChildInits, Folds>>;
|
|
633
|
+
export {};
|
|
446
634
|
//# sourceMappingURL=update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,EAAQ,MAAM,QAAQ,CAAA;AAEtD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,KAAK,OAAO,EAA2B,MAAM,qBAAqB,CAAA;AAE3E;;;;;;;;;UASU;AACV,MAAM,MAAM,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK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I,MAAM,UAAU,GAAG,kBAAkB,CACpD,UAAU,CAAC,GAAG,CAAC,EACf,UAAU,CAAC,aAAa,CAAC,EACzB,KAAK,CAAC,GAAG,CAAC,CACX;KACF,CAAC,CAAA;CACL,CAAC,GAAG;IACH,iBAAiB,CAAC,EAAE,CAClB,WAAW,EAAE,eAAe,CAAC,KAAK,CAAC,EACnC,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC,KAC7B,gBAAgB,GAAG,SAAS,CAAA;CAClC,GAAG,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,KAC/B,OAAO,SAAS,KAAK,CAAC,MAAM,KAAK,CAAC,GACnC,oBAAoB,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,GAC1E,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACxD,MAAM,CACJ,UAAU,CAAC,aAAa,CAAC,EACzB,YAAY,CAAC,KAAK,CAAC,EACnB,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAC,CACpC,GACD,oBAAoB,CAClB,UAAU,CAAC,aAAa,CAAC,EACzB,YAAY,CAAC,KAAK,CAAC,EACnB,gBAAgB,EAChB,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAC,CA4G1C,CAAA"}
|
package/dist/update/update.js
CHANGED
|
@@ -150,24 +150,27 @@ const runChildFold = (childFold, context, model, input) => pipe(model, childFold
|
|
|
150
150
|
onSome: childModel => {
|
|
151
151
|
const childUpdate = childFold.update(childModel, input);
|
|
152
152
|
const modelWithChild = childFold.write(model, childUpdate.model);
|
|
153
|
-
|
|
154
|
-
const update = childFold.foldOutMessage === undefined ||
|
|
155
|
-
childUpdate.outMessage === undefined
|
|
156
|
-
? { model: modelWithChild, commands: mappedCommands }
|
|
157
|
-
: appendOutMessageStep(childFold.foldOutMessage, childUpdate.outMessage, context, modelWithChild, mappedCommands);
|
|
158
|
-
if (update.outMessage !== undefined) {
|
|
159
|
-
return update;
|
|
160
|
-
}
|
|
161
|
-
if (childFold.toParentOutMessage === undefined ||
|
|
162
|
-
childUpdate.outMessage === undefined) {
|
|
163
|
-
return update;
|
|
164
|
-
}
|
|
165
|
-
const parentOutMessage = childFold.toParentOutMessage(childUpdate.outMessage);
|
|
166
|
-
return parentOutMessage === undefined
|
|
167
|
-
? update
|
|
168
|
-
: { ...update, outMessage: parentOutMessage };
|
|
153
|
+
return finalizeChildFold(childUpdate, modelWithChild, childFold, context);
|
|
169
154
|
},
|
|
170
155
|
}));
|
|
156
|
+
const finalizeChildFold = (childReturn, modelWithChild, childFold, context) => {
|
|
157
|
+
const mappedCommands = mapMessages(childReturn.commands, childFold.toParentMessage);
|
|
158
|
+
const update = childFold.foldOutMessage === undefined ||
|
|
159
|
+
childReturn.outMessage === undefined
|
|
160
|
+
? { model: modelWithChild, commands: mappedCommands }
|
|
161
|
+
: appendOutMessageStep(childFold.foldOutMessage, childReturn.outMessage, context, modelWithChild, mappedCommands);
|
|
162
|
+
if (update.outMessage !== undefined) {
|
|
163
|
+
return update;
|
|
164
|
+
}
|
|
165
|
+
if (childFold.toParentOutMessage === undefined ||
|
|
166
|
+
childReturn.outMessage === undefined) {
|
|
167
|
+
return update;
|
|
168
|
+
}
|
|
169
|
+
const parentOutMessage = childFold.toParentOutMessage(childReturn.outMessage);
|
|
170
|
+
return parentOutMessage === undefined
|
|
171
|
+
? update
|
|
172
|
+
: { ...update, outMessage: parentOutMessage };
|
|
173
|
+
};
|
|
171
174
|
/** Folds a child entry point that takes nothing but the child Model, and
|
|
172
175
|
* returns the {@link Step} directly. Everything else matches
|
|
173
176
|
* {@link foldChild}: the child is read, updated, and written back, its
|
|
@@ -213,3 +216,162 @@ const appendOutMessageStep = (foldOutMessage, outMessage, context, modelWithChil
|
|
|
213
216
|
const commands = [...mappedCommands, ...(outMessageFold.commands ?? [])];
|
|
214
217
|
return { ...outMessageFold, commands };
|
|
215
218
|
};
|
|
219
|
+
/** Builds a parent Model from a child's init or boot result, lifts the child's
|
|
220
|
+
* Commands through `toParentMessage`, and handles any child OutMessage.
|
|
221
|
+
* Call it data-first with the completed child result and the parent adapters.
|
|
222
|
+
*
|
|
223
|
+
* `toParentModel` constructs the complete parent Model before `foldOutMessage`
|
|
224
|
+
* runs. The fold receives the same {@link FoldContext} as {@link foldChild},
|
|
225
|
+
* and its Commands follow the mapped child Commands. The returned Message
|
|
226
|
+
* and service requirements include both the child's mapped Commands and the
|
|
227
|
+
* OutMessage Step's Commands.
|
|
228
|
+
*
|
|
229
|
+
* For example, a parent can initialize a search Submodel that requests its
|
|
230
|
+
* first query during boot:
|
|
231
|
+
*
|
|
232
|
+
* ```ts
|
|
233
|
+
* const foldSearchOutMessage = Search.OutMessage.match<Update.Step<Model, Message>>({
|
|
234
|
+
* RequestedSearch: ({ query }) => model => ({
|
|
235
|
+
* model: evo(model, { results: () => AsyncData.Loading() }),
|
|
236
|
+
* commands: [FetchResults({ query })],
|
|
237
|
+
* }),
|
|
238
|
+
* })
|
|
239
|
+
*
|
|
240
|
+
* const init = (): Update.Return<Model, Message> =>
|
|
241
|
+
* Update.foldChildInit(Search.boot({ query: '' }), {
|
|
242
|
+
* toParentModel: search => Model.make({ search, results: AsyncData.Idle() }),
|
|
243
|
+
* toParentMessage: toGotSearchMessage,
|
|
244
|
+
* foldOutMessage: foldSearchOutMessage,
|
|
245
|
+
* })
|
|
246
|
+
* ```
|
|
247
|
+
*
|
|
248
|
+
* A child result that can emit an OutMessage requires `foldOutMessage` or
|
|
249
|
+
* `toParentOutMessage`. A local fold returning {@link Step} produces a plain
|
|
250
|
+
* {@link Return}; a fold returning {@link StepWithOutMessage} produces a
|
|
251
|
+
* {@link ReturnWithOutMessage}. Add `toParentOutMessage` to forward child
|
|
252
|
+
* OutMessages, optionally alongside local handling. A derived OutMessage
|
|
253
|
+
* replaces the forwarded one. When the child emits nothing, neither adapter
|
|
254
|
+
* runs and the result omits `outMessage`.
|
|
255
|
+
*/
|
|
256
|
+
export const foldChildInit = (childInit, childFold) => {
|
|
257
|
+
const model = childFold.toParentModel(childInit.model);
|
|
258
|
+
const context = makeFoldContext(childFold.toParentMessage);
|
|
259
|
+
return finalizeChildFold(childInit, model, childFold, context);
|
|
260
|
+
};
|
|
261
|
+
/** Builds a complete parent Model from named child init or boot results before
|
|
262
|
+
* handling any of their OutMessages. Call this function data-first.
|
|
263
|
+
*
|
|
264
|
+
* `toParentModel` receives the record of child Models and runs exactly once.
|
|
265
|
+
* The `folds` record has the same keys as `childInits`. Each fold receives the
|
|
266
|
+
* Model produced by the preceding fold, so a change to another child is kept.
|
|
267
|
+
* Folds follow the record's own-key order: array-index keys first in numeric
|
|
268
|
+
* order, then other string keys in insertion order, then Symbols in insertion
|
|
269
|
+
* order.
|
|
270
|
+
* Prefer descriptive string keys to make that order visible at the call site.
|
|
271
|
+
*
|
|
272
|
+
* For example, a Workspace Submodel contains Search and Editor Submodels:
|
|
273
|
+
*
|
|
274
|
+
* ```ts
|
|
275
|
+
* const init = (): Update.Return<Model, Message> =>
|
|
276
|
+
* Update.foldChildInits(
|
|
277
|
+
* { search: Search.init(), editor: Editor.init() },
|
|
278
|
+
* {
|
|
279
|
+
* toParentModel: ({ search, editor }) => Model.make({ search, editor }),
|
|
280
|
+
* folds: {
|
|
281
|
+
* search: {
|
|
282
|
+
* toParentMessage: message => Message.GotSearchMessage({ message }),
|
|
283
|
+
* },
|
|
284
|
+
* editor: {
|
|
285
|
+
* toParentMessage: message => Message.GotEditorMessage({ message }),
|
|
286
|
+
* },
|
|
287
|
+
* },
|
|
288
|
+
* },
|
|
289
|
+
* )
|
|
290
|
+
* ```
|
|
291
|
+
*
|
|
292
|
+
* Add `foldOutMessage` to handle a child's OutMessage against the completed
|
|
293
|
+
* parent Model. The Editor fold also sees changes made by the Search fold.
|
|
294
|
+
* For each child, mapped child Commands precede Commands from its OutMessage
|
|
295
|
+
* fold. All Commands for that child precede the next child's Commands. Array
|
|
296
|
+
* order does not guarantee execution or completion order. Each fold receives
|
|
297
|
+
* its own {@link FoldContext}; Message and service requirement unions include
|
|
298
|
+
* every child and OutMessage Step. When using the context, annotate both
|
|
299
|
+
* handler parameters, for example `(outMessage: Search.OutMessage,
|
|
300
|
+
* context: Update.FoldContext<Search.Message, Message>)`. An unannotated
|
|
301
|
+
* context has an `unknown` parent Message. The annotated context is checked
|
|
302
|
+
* against the same entry's `toParentMessage`.
|
|
303
|
+
*
|
|
304
|
+
* Each entry supports the same local handling and forwarding as
|
|
305
|
+
* {@link foldChildInit}. A child that can emit an OutMessage requires
|
|
306
|
+
* `foldOutMessage` or `toParentOutMessage`. A derived parent OutMessage takes
|
|
307
|
+
* precedence over forwarding within that entry.
|
|
308
|
+
*
|
|
309
|
+
* TypeScript can leave an inline generic `match` adapter unresolved. Name the
|
|
310
|
+
* adapter or pass its output type explicitly to keep the exact Message,
|
|
311
|
+
* OutMessage, and service types. If an entry remains unresolved, the return
|
|
312
|
+
* keeps the parent Model type and widens those other types to `unknown` rather
|
|
313
|
+
* than incorrectly reporting `never`.
|
|
314
|
+
*
|
|
315
|
+
* If any entry can emit a parent OutMessage, supply `resolveOutMessage` to
|
|
316
|
+
* construct the single final OutMessage. It receives optional parent
|
|
317
|
+
* OutMessages under their child keys, followed by the final parent Model.
|
|
318
|
+
* For example, combine a restored query and a restored draft into one
|
|
319
|
+
* `RestoredWorkspace` OutMessage that preserves both results. Choosing one
|
|
320
|
+
* child's OutMessage discards the other and needs an application-specific
|
|
321
|
+
* reason. The resolver runs after all folds, only when at least one entry
|
|
322
|
+
* emitted an OutMessage. If the final Model alone contains everything needed,
|
|
323
|
+
* local folds followed by {@link withOutMessage} can report the parent result.
|
|
324
|
+
* Return `undefined` to emit nothing. Local-only folds return {@link Return};
|
|
325
|
+
* outward-capable folds return {@link ReturnWithOutMessage}. Absent child
|
|
326
|
+
* OutMessages skip their handlers, and absent final OutMessages omit the
|
|
327
|
+
* `outMessage` property.
|
|
328
|
+
*/
|
|
329
|
+
export const foldChildInits = (childInits, configuration) => {
|
|
330
|
+
const childKeys = Reflect.ownKeys(childInits);
|
|
331
|
+
const foldKeys = Reflect.ownKeys(configuration.folds);
|
|
332
|
+
if (childKeys.length !== foldKeys.length ||
|
|
333
|
+
foldKeys.some(key => !Object.hasOwn(childInits, key))) {
|
|
334
|
+
throw new Error('foldChildInits requires one fold for each child init and no extra folds');
|
|
335
|
+
}
|
|
336
|
+
const models = Object.fromEntries(childKeys.map(key => {
|
|
337
|
+
const childInit = childInits[key];
|
|
338
|
+
if (childInit === undefined) {
|
|
339
|
+
throw new Error('foldChildInits requires a result for each child init');
|
|
340
|
+
}
|
|
341
|
+
return [key, childInit.model];
|
|
342
|
+
}));
|
|
343
|
+
const initialModel = configuration.toParentModel(models);
|
|
344
|
+
const completed = foldKeys.reduce((current, key) => {
|
|
345
|
+
const childInit = childInits[key];
|
|
346
|
+
const childFold = configuration.folds[key];
|
|
347
|
+
if (childInit === undefined || childFold === undefined) {
|
|
348
|
+
throw new Error('foldChildInits requires a result and fold for each child');
|
|
349
|
+
}
|
|
350
|
+
if (childInit.outMessage !== undefined &&
|
|
351
|
+
childFold.foldOutMessage === undefined &&
|
|
352
|
+
childFold.toParentOutMessage === undefined) {
|
|
353
|
+
throw new Error('foldChildInits requires a handler for each child OutMessage');
|
|
354
|
+
}
|
|
355
|
+
const childInitFold = finalizeChildFold(childInit, current.model, childFold, makeFoldContext(childFold.toParentMessage));
|
|
356
|
+
return {
|
|
357
|
+
model: childInitFold.model,
|
|
358
|
+
commands: [...current.commands, ...(childInitFold.commands ?? [])],
|
|
359
|
+
outMessages: childInitFold.outMessage === undefined
|
|
360
|
+
? current.outMessages
|
|
361
|
+
: [...current.outMessages, [key, childInitFold.outMessage]],
|
|
362
|
+
};
|
|
363
|
+
}, {
|
|
364
|
+
model: initialModel,
|
|
365
|
+
commands: Array.empty(),
|
|
366
|
+
outMessages: Array.empty(),
|
|
367
|
+
});
|
|
368
|
+
const parentInit = { model: completed.model, commands: completed.commands };
|
|
369
|
+
if (Array.isReadonlyArrayEmpty(completed.outMessages)) {
|
|
370
|
+
return parentInit;
|
|
371
|
+
}
|
|
372
|
+
if (configuration.resolveOutMessage === undefined) {
|
|
373
|
+
throw new Error('foldChildInits requires resolveOutMessage when a fold emits a parent OutMessage');
|
|
374
|
+
}
|
|
375
|
+
const outMessage = configuration.resolveOutMessage(Object.fromEntries(completed.outMessages), completed.model);
|
|
376
|
+
return outMessage === undefined ? parentInit : { ...parentInit, outMessage };
|
|
377
|
+
};
|