@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.
- package/dist/dev.js +41 -14
- package/dist/node.cjs +184 -157
- package/dist/prod.js +184 -157
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/core/scheduler.d.ts +2 -2
- package/dist/types/core/suspense.d.ts +2 -2
- package/dist/types/signals.d.ts +3 -3
- package/package.json +1 -1
|
@@ -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):
|
|
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):
|
|
8
|
+
run(type: number): true | undefined;
|
|
9
9
|
_update(node: Effect): void;
|
|
10
10
|
}
|
|
11
|
-
export declare function createSuspense(fn: () => any,
|
|
11
|
+
export declare function createSuspense(fn: () => any, fallback: () => any): () => any;
|
package/dist/types/signals.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
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
|
|
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
|
|
141
|
+
export declare function createErrorBoundary<T, U>(fn: () => T, fallback: (error: unknown, reset: () => void) => U): Accessor<T | U>;
|