@absolutejs/absolute 0.19.0-beta.962 → 0.19.0-beta.963

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.
@@ -9434,6 +9434,15 @@ var useResource = (fetcher, options = {}) => {
9434
9434
  }
9435
9435
  }
9436
9436
  };
9437
+ const mutate = (next) => {
9438
+ if (destroyed)
9439
+ return;
9440
+ cancel();
9441
+ error.set(null);
9442
+ loading.set(false);
9443
+ const resolved = typeof next === "function" ? next(data()) : next;
9444
+ data.set(resolved);
9445
+ };
9437
9446
  destroyRef.onDestroy(() => {
9438
9447
  destroyed = true;
9439
9448
  cancel();
@@ -9441,7 +9450,7 @@ var useResource = (fetcher, options = {}) => {
9441
9450
  if (options.immediate !== false) {
9442
9451
  refresh();
9443
9452
  }
9444
- return { cancel, data, error, loading, refresh };
9453
+ return { cancel, data, error, loading, mutate, refresh };
9445
9454
  };
9446
9455
  // src/angular/composables/useSubscription.ts
9447
9456
  import { DestroyRef as DestroyRef2, inject as inject2 } from "@angular/core";
@@ -10344,5 +10353,5 @@ export {
10344
10353
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
10345
10354
  };
10346
10355
 
10347
- //# debugId=FD9C5AD1A03DDE0F64756E2164756E21
10356
+ //# debugId=566EE1BB76DC6E4A64756E2164756E21
10348
10357
  //# sourceMappingURL=browser.js.map