@yiin/reactive-proxy-state 1.0.15 → 1.0.16

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/index.js CHANGED
@@ -513,12 +513,7 @@ function trigger(target, key) {
513
513
  function watchEffect(effectCallback, options = {}) {
514
514
  const run = () => {
515
515
  if (!effectFn.active) {
516
- try {
517
- return effectCallback();
518
- } catch (e) {
519
- console.error("error in stopped watchEffect callback:", e);
520
- return;
521
- }
516
+ throw new Error("Trying to run a stopped effect");
522
517
  }
523
518
  const previousEffect = activeEffect;
524
519
  try {
@@ -1,4 +1,4 @@
1
- type EffectCallback<T = any> = (onCleanup?: (cleanupFn: () => void) => void) => T;
1
+ type EffectCallback<T = any> = (onCleanup: (cleanupFn: () => void) => void) => T;
2
2
  type Scheduler = (job: () => void) => void;
3
3
  export interface WatchEffectStopHandle<T = any> {
4
4
  (): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yiin/reactive-proxy-state",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "author": "Yiin <stanislovas@yiin.lt>",
5
5
  "repository": {
6
6
  "type": "git",