@typeonce/effect-machine 0.45.0 → 0.46.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/Machine.d.ts CHANGED
@@ -1163,9 +1163,14 @@ export interface Prepared<out State, in Event, out Error, out Output, out Emitte
1163
1163
  * `send` reports whether an event was accepted for delivery. A running
1164
1164
  * machine reference is local, so an idle machine processes an accepted event
1165
1165
  * in the sender's turn: work that completes without suspending is reflected
1166
- * by `snapshot` when `send` returns. Work that suspends continues in the
1167
- * background, and an event sent while the machine is processing is queued
1168
- * behind the current work. `changes` subscribers receive every committed
1166
+ * by `snapshot` when `send` returns. Work invoked by an entered state also
1167
+ * starts in the sender's turn and runs until it first suspends, so browser
1168
+ * APIs that require user activation, such as `window.open`, can run in the
1169
+ * first step of an invoked Effect. Work that suspends continues in the
1170
+ * background, and its outcome is handled in a later turn, even when the work
1171
+ * completes without suspending, so the entered state is always observed
1172
+ * before the outcome leaves it. An event sent while the machine is processing
1173
+ * is queued behind the current work. `changes` subscribers receive every committed
1169
1174
  * snapshot in order once the sender yields, with consecutive sends delivered
1170
1175
  * together. This guarantee belongs to `MachineRef`; a `MachineTarget` only
1171
1176
  * promises delivery. Errors that occur while processing an accepted event are
@@ -1198,7 +1203,8 @@ export interface MachineRef<out State, in Event, out Error = never, out Output =
1198
1203
  /**
1199
1204
  * Accepts an event for processing by this local machine. An idle machine
1200
1205
  * processes it in the sender's turn until the work first suspends, so
1201
- * `snapshot` reflects it when `send` returns.
1206
+ * `snapshot` reflects it when `send` returns. Work invoked by an entered
1207
+ * state starts in the same turn; its outcome is handled in a later turn.
1202
1208
  */
1203
1209
  readonly send: (event: Event) => Effect.Effect<void, StoppedError>;
1204
1210
  /**