xstate 5.17.3 → 5.18.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.
@@ -248,9 +248,8 @@ const instanceStates = /* #__PURE__ */new WeakMap();
248
248
  * });
249
249
  * ```
250
250
  *
251
- * @param invokeCallback - The callback function used to describe the callback
252
- * logic The callback function is passed an object with the following
253
- * properties:
251
+ * @param callback - The callback function used to describe the callback logic
252
+ * The callback function is passed an object with the following properties:
254
253
  *
255
254
  * - `receive` - A function that can send events back to the parent actor; the
256
255
  * listener is then called whenever events are received by the callback
@@ -263,12 +262,12 @@ const instanceStates = /* #__PURE__ */new WeakMap();
263
262
  * when the actor is stopped.
264
263
  *
265
264
  * @returns Callback logic
266
- * @see {@link InvokeCallback} for more information about the callback function and its object argument
265
+ * @see {@link CallbackLogicFunction} for more information about the callback function and its object argument
267
266
  * @see {@link https://stately.ai/docs/input | Input docs} for more information about how input is passed
268
267
  */
269
- function fromCallback(invokeCallback) {
268
+ function fromCallback(callback) {
270
269
  const logic = {
271
- config: invokeCallback,
270
+ config: callback,
272
271
  start: (state, actorScope) => {
273
272
  const {
274
273
  self,
@@ -280,7 +279,7 @@ function fromCallback(invokeCallback) {
280
279
  dispose: undefined
281
280
  };
282
281
  instanceStates.set(self, callbackState);
283
- callbackState.dispose = invokeCallback({
282
+ callbackState.dispose = callback({
284
283
  input: state.input,
285
284
  system,
286
285
  self,
@@ -248,9 +248,8 @@ const instanceStates = /* #__PURE__ */new WeakMap();
248
248
  * });
249
249
  * ```
250
250
  *
251
- * @param invokeCallback - The callback function used to describe the callback
252
- * logic The callback function is passed an object with the following
253
- * properties:
251
+ * @param callback - The callback function used to describe the callback logic
252
+ * The callback function is passed an object with the following properties:
254
253
  *
255
254
  * - `receive` - A function that can send events back to the parent actor; the
256
255
  * listener is then called whenever events are received by the callback
@@ -263,12 +262,12 @@ const instanceStates = /* #__PURE__ */new WeakMap();
263
262
  * when the actor is stopped.
264
263
  *
265
264
  * @returns Callback logic
266
- * @see {@link InvokeCallback} for more information about the callback function and its object argument
265
+ * @see {@link CallbackLogicFunction} for more information about the callback function and its object argument
267
266
  * @see {@link https://stately.ai/docs/input | Input docs} for more information about how input is passed
268
267
  */
269
- function fromCallback(invokeCallback) {
268
+ function fromCallback(callback) {
270
269
  const logic = {
271
- config: invokeCallback,
270
+ config: callback,
272
271
  start: (state, actorScope) => {
273
272
  const {
274
273
  self,
@@ -280,7 +279,7 @@ function fromCallback(invokeCallback) {
280
279
  dispose: undefined
281
280
  };
282
281
  instanceStates.set(self, callbackState);
283
- callbackState.dispose = invokeCallback({
282
+ callbackState.dispose = callback({
284
283
  input: state.input,
285
284
  system,
286
285
  self,
@@ -244,9 +244,8 @@ const instanceStates = /* #__PURE__ */new WeakMap();
244
244
  * });
245
245
  * ```
246
246
  *
247
- * @param invokeCallback - The callback function used to describe the callback
248
- * logic The callback function is passed an object with the following
249
- * properties:
247
+ * @param callback - The callback function used to describe the callback logic
248
+ * The callback function is passed an object with the following properties:
250
249
  *
251
250
  * - `receive` - A function that can send events back to the parent actor; the
252
251
  * listener is then called whenever events are received by the callback
@@ -259,12 +258,12 @@ const instanceStates = /* #__PURE__ */new WeakMap();
259
258
  * when the actor is stopped.
260
259
  *
261
260
  * @returns Callback logic
262
- * @see {@link InvokeCallback} for more information about the callback function and its object argument
261
+ * @see {@link CallbackLogicFunction} for more information about the callback function and its object argument
263
262
  * @see {@link https://stately.ai/docs/input | Input docs} for more information about how input is passed
264
263
  */
265
- function fromCallback(invokeCallback) {
264
+ function fromCallback(callback) {
266
265
  const logic = {
267
- config: invokeCallback,
266
+ config: callback,
268
267
  start: (state, actorScope) => {
269
268
  const {
270
269
  self,
@@ -276,7 +275,7 @@ function fromCallback(invokeCallback) {
276
275
  dispose: undefined
277
276
  };
278
277
  instanceStates.set(self, callbackState);
279
- callbackState.dispose = invokeCallback({
278
+ callbackState.dispose = callback({
280
279
  input: state.input,
281
280
  system,
282
281
  self,
@@ -244,9 +244,8 @@ const instanceStates = /* #__PURE__ */new WeakMap();
244
244
  * });
245
245
  * ```
246
246
  *
247
- * @param invokeCallback - The callback function used to describe the callback
248
- * logic The callback function is passed an object with the following
249
- * properties:
247
+ * @param callback - The callback function used to describe the callback logic
248
+ * The callback function is passed an object with the following properties:
250
249
  *
251
250
  * - `receive` - A function that can send events back to the parent actor; the
252
251
  * listener is then called whenever events are received by the callback
@@ -259,12 +258,12 @@ const instanceStates = /* #__PURE__ */new WeakMap();
259
258
  * when the actor is stopped.
260
259
  *
261
260
  * @returns Callback logic
262
- * @see {@link InvokeCallback} for more information about the callback function and its object argument
261
+ * @see {@link CallbackLogicFunction} for more information about the callback function and its object argument
263
262
  * @see {@link https://stately.ai/docs/input | Input docs} for more information about how input is passed
264
263
  */
265
- function fromCallback(invokeCallback) {
264
+ function fromCallback(callback) {
266
265
  const logic = {
267
- config: invokeCallback,
266
+ config: callback,
268
267
  start: (state, actorScope) => {
269
268
  const {
270
269
  self,
@@ -276,7 +275,7 @@ function fromCallback(invokeCallback) {
276
275
  dispose: undefined
277
276
  };
278
277
  instanceStates.set(self, callbackState);
279
- callbackState.dispose = invokeCallback({
278
+ callbackState.dispose = callback({
280
279
  input: state.input,
281
280
  system,
282
281
  self,