@solidjs/signals 0.0.5 → 0.0.7

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.
@@ -2,7 +2,7 @@ export { ContextNotFoundError, NoOwnerError, NotReadyError, type ErrorHandler }
2
2
  export { Owner, createContext, getContext, setContext, hasContext, getOwner, onCleanup, type Context, type ContextRecord, type Disposable } from "./owner.js";
3
3
  export { Computation, getObserver, isEqual, untrack, hasUpdated, isPending, latest, UNCHANGED, compute, type SignalOptions } from "./core.js";
4
4
  export { Effect, EagerComputation } from "./effect.js";
5
- export { flushSync, createBoundary, type IQueue, Queue } from "./scheduler.js";
5
+ export { flushSync, createBoundary, queueTask, type IQueue, Queue } from "./scheduler.js";
6
6
  export { createSuspense } from "./suspense.js";
7
7
  export { SUPPORTS_PROXY } from "./constants.js";
8
8
  export * from "./flags.js";
@@ -2,7 +2,7 @@ import { Computation } from "./core.js";
2
2
  import type { Effect } from "./effect.js";
3
3
  export interface IQueue {
4
4
  enqueue<T extends Computation | Effect>(type: number, node: T): void;
5
- run(type: number): void;
5
+ run(type: number): boolean | void;
6
6
  flush(): void;
7
7
  addChild(child: IQueue): void;
8
8
  removeChild(child: IQueue): void;
@@ -12,7 +12,7 @@ export declare class Queue implements IQueue {
12
12
  _queues: [Computation[], Effect[], Effect[]];
13
13
  _children: IQueue[];
14
14
  enqueue<T extends Computation | Effect>(type: number, node: T): void;
15
- run(type: number): void;
15
+ run(type: number): true | undefined;
16
16
  flush(): void;
17
17
  addChild(child: IQueue): void;
18
18
  removeChild(child: IQueue): void;
@@ -5,7 +5,7 @@ export declare class SuspenseQueue extends Queue {
5
5
  _nodes: Set<Effect>;
6
6
  _fallback: boolean;
7
7
  _signal: Computation<boolean>;
8
- run(type: number): void;
8
+ run(type: number): true | undefined;
9
9
  _update(node: Effect): void;
10
10
  }
11
- export declare function createSuspense(fn: () => any, fallbackFn: () => any): () => any;
11
+ export declare function createSuspense(fn: () => any, fallback: () => any): () => any;
@@ -130,12 +130,12 @@ export declare function createRoot<T>(init: ((dispose: () => void) => T) | (() =
130
130
  */
131
131
  export declare function runWithOwner<T>(owner: Owner | null, run: () => T): T | undefined;
132
132
  /**
133
- * Runs an effect whenever an error is thrown within the context of the child scopes
133
+ * Switches to fallback whenever an error is thrown within the context of the child scopes
134
134
  * @param fn boundary for the error
135
- * @param handler an error handler that receives the error
135
+ * @param fallback an error handler that receives the error
136
136
  *
137
137
  * * If the error is thrown again inside the error handler, it will trigger the next available parent handler
138
138
  *
139
139
  * @description https://docs.solidjs.com/reference/reactive-utilities/catch-error
140
140
  */
141
- export declare function catchError<T>(fn: () => T, handler: (error: unknown) => void): T | undefined;
141
+ export declare function createErrorBoundary<T, U>(fn: () => T, fallback: (error: unknown, reset: () => void) => U): Accessor<T | U>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidjs/signals",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",