@solidjs/signals 2.0.0-beta.9 → 2.0.0-rc.1
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/README.md +14 -10
- package/dist/dev.js +6740 -2011
- package/dist/node.cjs +7927 -3340
- package/dist/prod/affects.js +126 -0
- package/dist/prod/boundaries.js +572 -0
- package/dist/prod/core/action.js +139 -0
- package/dist/prod/core/async.js +607 -0
- package/dist/prod/core/constants.js +92 -0
- package/dist/prod/core/context.js +67 -0
- package/dist/prod/core/core.js +828 -0
- package/dist/prod/core/dev.js +3 -0
- package/dist/prod/core/effect.js +145 -0
- package/dist/prod/core/error.js +68 -0
- package/dist/prod/core/external.js +98 -0
- package/dist/prod/core/graph.js +104 -0
- package/dist/prod/core/heap.js +140 -0
- package/dist/prod/core/invariants.js +42 -0
- package/dist/prod/core/lanes.js +140 -0
- package/dist/prod/core/optimistic.js +262 -0
- package/dist/prod/core/owner.js +302 -0
- package/dist/prod/core/scheduler.js +757 -0
- package/dist/prod/core/verdict.js +369 -0
- package/dist/prod/index.js +45 -0
- package/dist/prod/map.js +319 -0
- package/dist/prod/signals.js +394 -0
- package/dist/prod/store/index.js +36 -0
- package/dist/prod/store/next/optimistic.js +377 -0
- package/dist/prod/store/next/projection.js +172 -0
- package/dist/prod/store/next/reconcile.js +327 -0
- package/dist/prod/store/next/store.js +1232 -0
- package/dist/prod/store/next/target.js +20 -0
- package/dist/prod/store/store.js +325 -0
- package/dist/prod/store/storePath.js +103 -0
- package/dist/prod/store/utils.js +201 -0
- package/dist/types/affects.d.ts +47 -0
- package/dist/types/boundaries.d.ts +60 -13
- package/dist/types/core/action.d.ts +35 -6
- package/dist/types/core/async.d.ts +16 -1
- package/dist/types/core/constants.d.ts +35 -6
- package/dist/types/core/context.d.ts +10 -2
- package/dist/types/core/core.d.ts +66 -63
- package/dist/types/core/dev.d.ts +17 -2
- package/dist/types/core/effect.d.ts +1 -2
- package/dist/types/core/error.d.ts +33 -0
- package/dist/types/core/external.d.ts +0 -11
- package/dist/types/core/graph.d.ts +2 -1
- package/dist/types/core/heap.d.ts +8 -0
- package/dist/types/core/index.d.ts +3 -2
- package/dist/types/core/invariants.d.ts +59 -0
- package/dist/types/core/lanes.d.ts +2 -0
- package/dist/types/core/optimistic.d.ts +6 -0
- package/dist/types/core/owner.d.ts +50 -3
- package/dist/types/core/scheduler.d.ts +85 -11
- package/dist/types/core/types.d.ts +66 -1
- package/dist/types/core/verdict.d.ts +2 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/map.d.ts +21 -5
- package/dist/types/signals.d.ts +183 -12
- package/dist/types/store/index.d.ts +16 -6
- package/dist/types/store/next/optimistic.d.ts +20 -0
- package/dist/types/store/next/projection.d.ts +24 -0
- package/dist/types/store/next/reconcile.d.ts +3 -0
- package/dist/types/store/next/store.d.ts +71 -0
- package/dist/types/store/next/target.d.ts +99 -0
- package/dist/types/store/optimistic.d.ts +3 -3
- package/dist/types/store/projection.d.ts +10 -6
- package/dist/types/store/reconcile.d.ts +31 -8
- package/dist/types/store/store.d.ts +91 -71
- package/dist/types/store/utils.d.ts +0 -40
- package/dist/types-cjs/affects.d.cts +47 -0
- package/dist/types-cjs/boundaries.d.cts +60 -13
- package/dist/types-cjs/core/action.d.cts +35 -6
- package/dist/types-cjs/core/async.d.cts +16 -1
- package/dist/types-cjs/core/constants.d.cts +35 -6
- package/dist/types-cjs/core/context.d.cts +10 -2
- package/dist/types-cjs/core/core.d.cts +66 -63
- package/dist/types-cjs/core/dev.d.cts +17 -2
- package/dist/types-cjs/core/effect.d.cts +1 -2
- package/dist/types-cjs/core/error.d.cts +33 -0
- package/dist/types-cjs/core/external.d.cts +0 -11
- package/dist/types-cjs/core/graph.d.cts +2 -1
- package/dist/types-cjs/core/heap.d.cts +8 -0
- package/dist/types-cjs/core/index.d.cts +3 -2
- package/dist/types-cjs/core/invariants.d.cts +59 -0
- package/dist/types-cjs/core/lanes.d.cts +2 -0
- package/dist/types-cjs/core/optimistic.d.cts +6 -0
- package/dist/types-cjs/core/owner.d.cts +50 -3
- package/dist/types-cjs/core/scheduler.d.cts +85 -11
- package/dist/types-cjs/core/types.d.cts +66 -1
- package/dist/types-cjs/core/verdict.d.cts +2 -0
- package/dist/types-cjs/index.d.cts +3 -2
- package/dist/types-cjs/map.d.cts +21 -5
- package/dist/types-cjs/signals.d.cts +183 -12
- package/dist/types-cjs/store/index.d.cts +16 -6
- package/dist/types-cjs/store/next/optimistic.d.cts +20 -0
- package/dist/types-cjs/store/next/projection.d.cts +24 -0
- package/dist/types-cjs/store/next/reconcile.d.cts +3 -0
- package/dist/types-cjs/store/next/store.d.cts +71 -0
- package/dist/types-cjs/store/next/target.d.cts +99 -0
- package/dist/types-cjs/store/optimistic.d.cts +3 -3
- package/dist/types-cjs/store/projection.d.cts +10 -6
- package/dist/types-cjs/store/reconcile.d.cts +31 -8
- package/dist/types-cjs/store/store.d.cts +91 -71
- package/dist/types-cjs/store/utils.d.cts +0 -40
- package/package.json +12 -9
- package/dist/prod.js +0 -3627
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Queue, type Computed, type Effect } from "./core/index.js";
|
|
2
2
|
import type { Signal } from "./core/index.js";
|
|
3
|
+
import { type Accessor } from "./signals.js";
|
|
3
4
|
export interface BoundaryComputed<T> extends Computed<T> {
|
|
4
5
|
_propagationMask: number;
|
|
5
6
|
}
|
|
@@ -19,18 +20,18 @@ export declare class RevealController {
|
|
|
19
20
|
_evaluating: boolean;
|
|
20
21
|
constructor(order: OrderAccessor, collapsed: BoolAccessor);
|
|
21
22
|
_forEachOwnedSlot(fn: (slot: RevealSlot) => boolean | void): boolean;
|
|
22
|
-
|
|
23
|
+
_isReady(): boolean;
|
|
23
24
|
/**
|
|
24
25
|
* "Minimally ready" = this group has something visible to show under its own policy.
|
|
25
26
|
* Used by an enclosing `together` group to decide when it can release.
|
|
26
|
-
* - `together`:
|
|
27
|
+
* - `together`: every direct slot is minimally ready.
|
|
27
28
|
* - `sequential`: the first owned slot is minimally ready (frontier can advance).
|
|
28
29
|
* - `natural`: any owned slot is minimally ready.
|
|
29
30
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
_isMinimallyReady(): boolean;
|
|
32
|
+
_register(slot: RevealSlot): void;
|
|
33
|
+
_unregister(slot: RevealSlot): void;
|
|
34
|
+
_evaluate(disabledOverride?: boolean, collapsedOverride?: boolean): void;
|
|
34
35
|
}
|
|
35
36
|
export declare class CollectionQueue extends Queue {
|
|
36
37
|
_collectionType: number;
|
|
@@ -38,6 +39,7 @@ export declare class CollectionQueue extends Queue {
|
|
|
38
39
|
_tree?: BoundaryComputed<any>;
|
|
39
40
|
_pending: boolean;
|
|
40
41
|
_disabled: Signal<boolean>;
|
|
42
|
+
_error?: Signal<unknown>;
|
|
41
43
|
_collapsed: Signal<boolean>;
|
|
42
44
|
_revealController?: RevealController;
|
|
43
45
|
_initialized: boolean;
|
|
@@ -46,7 +48,7 @@ export declare class CollectionQueue extends Queue {
|
|
|
46
48
|
constructor(type: number);
|
|
47
49
|
run(type: number): void;
|
|
48
50
|
notify(node: Effect<any>, type: number, flags: number, error?: any): boolean;
|
|
49
|
-
|
|
51
|
+
_checkSources(): void;
|
|
50
52
|
}
|
|
51
53
|
/**
|
|
52
54
|
* Lower-level primitive that backs the `<Loading>` flow control. Catches
|
|
@@ -59,20 +61,45 @@ export declare class CollectionQueue extends Queue {
|
|
|
59
61
|
* @param fallback the fallback shown while async reads in `fn` are unresolved
|
|
60
62
|
* @param options `on` — accessor whose value scopes the boundary; when set,
|
|
61
63
|
* transitions caused by writes to other reactive sources are *not* caught
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* // Custom boundary component built on top of the primitive.
|
|
68
|
+
* function MyLoading(props: { fallback: JSX.Element; children: JSX.Element }) {
|
|
69
|
+
* return createLoadingBoundary(
|
|
70
|
+
* () => props.children,
|
|
71
|
+
* () => props.fallback
|
|
72
|
+
* ) as unknown as JSX.Element;
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
62
75
|
*/
|
|
63
|
-
export declare function createLoadingBoundary(fn: () =>
|
|
76
|
+
export declare function createLoadingBoundary<T, U>(fn: () => T, fallback: () => U, options?: {
|
|
64
77
|
on?: () => any;
|
|
65
|
-
}):
|
|
78
|
+
}): Accessor<T | U>;
|
|
66
79
|
/**
|
|
67
80
|
* Lower-level primitive that backs the `<Errored>` flow control. Catches
|
|
68
81
|
* thrown errors inside `fn` and invokes `fallback(error, reset)` instead.
|
|
69
|
-
* `
|
|
70
|
-
* recover.
|
|
82
|
+
* `error` is an accessor for the latest captured error; `reset()` recomputes
|
|
83
|
+
* the failing sources so the boundary can attempt to recover.
|
|
71
84
|
*
|
|
72
85
|
* App code should use `<Errored fallback={...}>` instead — reach for this only
|
|
73
86
|
* when authoring custom boundary components.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* // Custom boundary that wraps the primitive and adds telemetry.
|
|
91
|
+
* function TracedErrored(props: { fallback: (e: () => unknown) => JSX.Element; children: JSX.Element }) {
|
|
92
|
+
* return createErrorBoundary(
|
|
93
|
+
* () => props.children,
|
|
94
|
+
* (err, reset) => {
|
|
95
|
+
* reportError(err());
|
|
96
|
+
* return props.fallback(err);
|
|
97
|
+
* }
|
|
98
|
+
* ) as unknown as JSX.Element;
|
|
99
|
+
* }
|
|
100
|
+
* ```
|
|
74
101
|
*/
|
|
75
|
-
export declare function createErrorBoundary<U>(fn: () =>
|
|
102
|
+
export declare function createErrorBoundary<T, U>(fn: () => T, fallback: (error: Accessor<unknown>, reset: () => void) => U): Accessor<T | U>;
|
|
76
103
|
/**
|
|
77
104
|
* Coordinate the reveal timing of sibling loading boundaries.
|
|
78
105
|
*
|
|
@@ -101,7 +128,18 @@ export declare function createErrorBoundary<U>(fn: () => any, fallback: (error:
|
|
|
101
128
|
* own minimal signal).
|
|
102
129
|
* - `together` — every direct slot is minimally ready.
|
|
103
130
|
* - `natural` — any direct slot has visible content (leaves on resolve; nested
|
|
104
|
-
* composites
|
|
131
|
+
* composites via their own minimal signal).
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```ts
|
|
135
|
+
* // Primitive form of `<Reveal>` — coordinate sibling loading boundaries
|
|
136
|
+
* // programmatically. App code uses the JSX `<Reveal>` component instead.
|
|
137
|
+
* // Both options are accessors so they can react to state changes.
|
|
138
|
+
* createRevealOrder(
|
|
139
|
+
* () => renderSiblings(),
|
|
140
|
+
* { order: () => mode(), collapsed: () => true }
|
|
141
|
+
* );
|
|
142
|
+
* ```
|
|
105
143
|
*/
|
|
106
144
|
export declare function createRevealOrder<T>(fn: () => T, options?: {
|
|
107
145
|
order?: OrderAccessor;
|
|
@@ -120,6 +158,15 @@ export declare function createRevealOrder<T>(fn: () => T, options?: {
|
|
|
120
158
|
* @param options
|
|
121
159
|
* - `skipNonRendered` — drop values that won't render
|
|
122
160
|
* - `doNotUnwrap` — leave function children as-is (caller will resolve)
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ```ts
|
|
164
|
+
* // Custom renderer walking a children tree manually. Most authors should
|
|
165
|
+
* // use `children()` from solid-js, which memoizes the resolved value.
|
|
166
|
+
* function renderChildren(value: unknown): unknown {
|
|
167
|
+
* return flatten(value, { skipNonRendered: true });
|
|
168
|
+
* }
|
|
169
|
+
* ```
|
|
123
170
|
*/
|
|
124
171
|
export declare function flatten(children: any, options?: {
|
|
125
172
|
skipNonRendered?: boolean;
|
|
@@ -1,13 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* The primitive for mutations: imperative async workflows whose *writes span
|
|
3
|
+
* an async gap* — optimistic write, server round-trip, reconciling write —
|
|
4
|
+
* where intermediate state must not leak and failure must revert cleanly
|
|
5
|
+
* (pair with `createOptimistic` / `createOptimisticStore`).
|
|
6
|
+
*
|
|
7
|
+
* Navigation-shaped updates do not need an action. A plain setter call is
|
|
8
|
+
* enough: reads pull the async, and downstream async computeds hold their
|
|
9
|
+
* previous values per-node until the new ones are ready (`isPending` /
|
|
10
|
+
* `latest` expose the in-flight state). Reach for `action` only when writes
|
|
11
|
+
* happen *after* async work, not merely upstream of it.
|
|
12
|
+
*
|
|
13
|
+
* Framework-level actions (router form actions, server actions) are
|
|
14
|
+
* specializations of this primitive: they are actions in exactly this sense —
|
|
15
|
+
* the same transactional semantics — with form binding, serialization, and
|
|
16
|
+
* submission tracking layered on top. The shared name is deliberate.
|
|
17
|
+
*
|
|
2
18
|
* Wraps a generator function so each invocation runs as a single transaction
|
|
3
19
|
* (a "transition") that batches every signal/store write between yields. The
|
|
4
20
|
* surrounding UI sees one atomic update per yielded step; nothing is committed
|
|
5
21
|
* until the action either completes or the next `yield` resolves.
|
|
6
22
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
23
|
+
* `yield` is the transaction-safe suspension point: the action waits for a
|
|
24
|
+
* yielded promise and re-enters the transaction before running the code after
|
|
25
|
+
* it. A plain `await` does NOT — the runtime has no hook into an async
|
|
26
|
+
* generator's internal await continuations, so writes to fresh signals
|
|
27
|
+
* between an `await` and the next `yield` escape the transaction and commit
|
|
28
|
+
* immediately. `await` is still the ergonomic choice for typed results; just
|
|
29
|
+
* put a bare `yield` before any writes that follow it:
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* const saved = await api.createTodo(text); // typed result
|
|
33
|
+
* yield; // re-enter the transaction before writing
|
|
34
|
+
* setTodos(t => { ... });
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* (For the same reason, don't call `flush()` inside an action body — it
|
|
38
|
+
* drains the transaction mid-step.)
|
|
11
39
|
*
|
|
12
40
|
* Each call returns a `Promise` that resolves with the generator's return
|
|
13
41
|
* value, or rejects if it throws. Pair with `createOptimistic` /
|
|
@@ -18,10 +46,11 @@
|
|
|
18
46
|
* ```ts
|
|
19
47
|
* const [todos, setTodos] = createOptimisticStore<Todo[]>([]);
|
|
20
48
|
*
|
|
21
|
-
* const addTodo = action(function* (text: string) {
|
|
49
|
+
* const addTodo = action(async function* (text: string) {
|
|
22
50
|
* const tempId = crypto.randomUUID();
|
|
23
51
|
* setTodos(t => { t.push({ id: tempId, text, pending: true }); }); // optimistic
|
|
24
|
-
* const saved =
|
|
52
|
+
* const saved = await api.createTodo(text); // network round-trip, typed
|
|
53
|
+
* yield; // re-enter the transaction
|
|
25
54
|
* setTodos(t => {
|
|
26
55
|
* const i = t.findIndex(x => x.id === tempId);
|
|
27
56
|
* if (i >= 0) t[i] = saved;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
+
import { NotReadyError } from "./error.js";
|
|
1
2
|
import { type OptimisticLane } from "./lanes.js";
|
|
2
|
-
import type { Computed } from "./types.js";
|
|
3
|
+
import type { Computed, Link } from "./types.js";
|
|
4
|
+
export declare function addPendingSource(el: Computed<any>, source: Computed<any>): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A loading-window node hit an unready source (sync throw in recompute, or a
|
|
7
|
+
* NotReadyError-rejected flight): register for the source's settle — the
|
|
8
|
+
* settlePendingSource walk runs off `_pendingSources` + `_blocked` alone —
|
|
9
|
+
* with NO read-visible pending status, no downstream propagation, no
|
|
10
|
+
* transition, no lane registration. Commit #0 keeps serving.
|
|
11
|
+
*/
|
|
12
|
+
export declare function parkLoadingWindow(el: Computed<any>, e: NotReadyError): void;
|
|
13
|
+
export declare function setPendingError(el: Computed<any>, source?: Computed<any>, error?: any): void;
|
|
14
|
+
export declare function forEachDependent(el: Computed<any>, fn: (node: Computed<any>, link: Link) => void): void;
|
|
15
|
+
export declare function releaseSettledDependents(el: Computed<any>): void;
|
|
16
|
+
export declare function settleErroredDependents(el: Computed<any>, error: any): void;
|
|
3
17
|
export declare function settlePendingSource(el: Computed<any>): void;
|
|
18
|
+
export declare function isThenable<T>(value: T | PromiseLike<T>): value is PromiseLike<T>;
|
|
4
19
|
export declare function handleAsync<T>(el: Computed<T>, result: T | PromiseLike<T> | AsyncIterable<T>, setter?: (value: T) => void): T;
|
|
5
20
|
export declare function clearStatus(el: Computed<any>, clearUninitialized?: boolean): void;
|
|
6
21
|
export declare function notifyStatus(el: Computed<any>, status: number, error: any, blockStatus?: boolean, lane?: OptimisticLane): void;
|
|
@@ -9,12 +9,22 @@ export declare const REACTIVE_DISPOSED: number;
|
|
|
9
9
|
export declare const REACTIVE_OPTIMISTIC_DIRTY: number;
|
|
10
10
|
export declare const REACTIVE_SNAPSHOT_STALE: number;
|
|
11
11
|
export declare const REACTIVE_LAZY: number;
|
|
12
|
+
export declare const REACTIVE_MANUAL_WRITE: number;
|
|
13
|
+
/**
|
|
14
|
+
* The pending recompute is a re-ask of the same question: `refresh()` dirtied
|
|
15
|
+
* the node while no tracked input changed value. Cleared whenever a real
|
|
16
|
+
* value-change notification arrives (`insertSubs`), and consumed by
|
|
17
|
+
* `recompute` into the node's `_reask` classification — a quiet (re-ask)
|
|
18
|
+
* pending window does not read as pending (question-scoped pending model).
|
|
19
|
+
*/
|
|
20
|
+
export declare const REACTIVE_REASK: number;
|
|
12
21
|
export declare const CONFIG_OWNED_WRITE: number;
|
|
13
22
|
export declare const CONFIG_NO_SNAPSHOT: number;
|
|
14
23
|
export declare const CONFIG_TRANSPARENT: number;
|
|
15
24
|
export declare const CONFIG_IN_SNAPSHOT_SCOPE: number;
|
|
16
25
|
export declare const CONFIG_CHILDREN_FORBIDDEN: number;
|
|
17
26
|
export declare const CONFIG_AUTO_DISPOSE: number;
|
|
27
|
+
export declare const CONFIG_SYNC: number;
|
|
18
28
|
export declare const STATUS_NONE = 0;
|
|
19
29
|
export declare const STATUS_PENDING: number;
|
|
20
30
|
export declare const STATUS_ERROR: number;
|
|
@@ -25,17 +35,36 @@ export declare const EFFECT_USER = 2;
|
|
|
25
35
|
export declare const EFFECT_TRACKED = 3;
|
|
26
36
|
export declare const NOT_PENDING: {};
|
|
27
37
|
export declare const NO_SNAPSHOT: {};
|
|
38
|
+
/**
|
|
39
|
+
* Stand-in stored in `_overrideValue` for an optimistic write of literal
|
|
40
|
+
* `undefined` (#2898). The slot doubles as the optimistic-node brand
|
|
41
|
+
* (`undefined` = not optimistic, `NOT_PENDING` = at rest), so the raw value
|
|
42
|
+
* would erase the node's optimistic identity: the write turns invisible and
|
|
43
|
+
* follow-up writes route off the optimistic path and commit permanently.
|
|
44
|
+
* Same shape as NO_SNAPSHOT. Sites that surface the override VALUE unwrap
|
|
45
|
+
* via `visibleOverrideValue`; slot identity tests stay raw.
|
|
46
|
+
*/
|
|
47
|
+
export declare const OVERRIDE_UNDEFINED: {};
|
|
48
|
+
/** Unwrap an active override's stored value for surfacing to readers (#2898). */
|
|
49
|
+
export declare function unwrapOverride<T = any>(v: unknown): T;
|
|
28
50
|
export declare const STORE_SNAPSHOT_PROPS = "sp";
|
|
29
51
|
export declare const SUPPORTS_PROXY: boolean;
|
|
30
52
|
export declare const defaultContext: {};
|
|
53
|
+
/**
|
|
54
|
+
* Brand symbol used by `Refreshable<T>` values (projection stores, async
|
|
55
|
+
* memos) to expose their underlying computation to `refresh()`. Not part of
|
|
56
|
+
* the user-facing API.
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
31
60
|
export declare const $REFRESH: unique symbol;
|
|
32
61
|
/**
|
|
33
|
-
* Brand applied to
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
62
|
+
* Brand applied to values that participate in the `refresh()` re-run protocol.
|
|
63
|
+
* Accessors receive this handle internally; projected stores expose it through
|
|
64
|
+
* their public return type so user-defined hooks that wrap `createOptimisticStore`
|
|
65
|
+
* / `createProjection` / projection-form `createStore` can have their return
|
|
66
|
+
* types inferred without leaking the internal `$REFRESH` symbol into public type
|
|
67
|
+
* signatures (TS4058).
|
|
39
68
|
*/
|
|
40
69
|
export type Refreshable<T> = T & {
|
|
41
70
|
readonly [$REFRESH]: any;
|
|
@@ -14,15 +14,23 @@ export type ContextRecord = Record<string | symbol, unknown>;
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function createContext<T>(defaultValue?: T, description?: string): Context<T>;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Low-level owner-targeted context read. The user-facing read API is
|
|
18
|
+
* `useContext` (in `solid-js`), which wraps this primitive. Exposed here for
|
|
19
|
+
* cross-package wiring (e.g. hydration-aware context plumbing).
|
|
18
20
|
*
|
|
19
21
|
* @throws `NoOwnerError` if there's no owner at the time of call.
|
|
20
22
|
* @throws `ContextNotFoundError` if a context value has not been set yet.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
21
25
|
*/
|
|
22
26
|
export declare function getContext<T>(context: Context<T>, owner?: Owner | null): T;
|
|
23
27
|
/**
|
|
24
|
-
*
|
|
28
|
+
* Low-level owner-targeted context write. The user-facing API is
|
|
29
|
+
* `createContext` (in `solid-js`); its provider component wraps this
|
|
30
|
+
* primitive. Exposed here for cross-package wiring.
|
|
25
31
|
*
|
|
26
32
|
* @throws `NoOwnerError` if there's no owner at the time of call.
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
27
35
|
*/
|
|
28
36
|
export declare function setContext<T>(context: Context<T>, value?: T, owner?: Owner | null): void;
|
|
@@ -2,11 +2,17 @@ import { type Refreshable } from "./constants.js";
|
|
|
2
2
|
import { type OptimisticLane } from "./lanes.js";
|
|
3
3
|
import type { Computed, FirewallSignal, NodeOptions, Owner, Signal } from "./types.js";
|
|
4
4
|
export declare const PRIMITIVE_IN_FORBIDDEN_SCOPE_MESSAGE = "[PRIMITIVE_IN_FORBIDDEN_SCOPE] Cannot create reactive primitives inside createTrackedEffect or owner-backed onSettled";
|
|
5
|
+
export declare const REACTIVE_WRITE_IN_OWNED_SCOPE_SIGNAL_MESSAGE: string;
|
|
6
|
+
export declare const REACTIVE_WRITE_IN_OWNED_SCOPE_REFRESH_MESSAGE: string;
|
|
5
7
|
export declare let tracking: boolean;
|
|
8
|
+
/** @internal verdict-module glue */
|
|
9
|
+
export declare function setPendingCheckActive(v: boolean): void;
|
|
10
|
+
/** @internal verdict-module glue */
|
|
11
|
+
export declare function setLatestReadActive(v: boolean): void;
|
|
12
|
+
/** @internal verdict-module glue */
|
|
13
|
+
export declare function setContextInternal(v: Owner | null): void;
|
|
6
14
|
export declare let stale: boolean;
|
|
7
|
-
export declare let refreshing: boolean;
|
|
8
15
|
export declare let pendingCheckActive: boolean;
|
|
9
|
-
export declare let foundPending: boolean;
|
|
10
16
|
export declare let latestReadActive: boolean;
|
|
11
17
|
export declare let context: Owner | null;
|
|
12
18
|
export declare let currentOptimisticLane: OptimisticLane | null;
|
|
@@ -19,6 +25,13 @@ export declare function clearSnapshots(): void;
|
|
|
19
25
|
export declare function recompute(el: Computed<any>, create?: boolean): void;
|
|
20
26
|
export declare function computed<T>(fn: (prev?: T) => T | PromiseLike<T> | AsyncIterable<T>): Computed<T>;
|
|
21
27
|
export declare function computed<T>(fn: (prev: T) => T | PromiseLike<T> | AsyncIterable<T>, options?: NodeOptions<T>): Computed<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Build an Effect node with all effect-specific fields baked into a single object literal,
|
|
30
|
+
* so V8 sees the full hidden class shape at construction time. Effects always run in lazy
|
|
31
|
+
* mode (recompute is called explicitly by `effect()`), so we hardcode the lazy bits and skip
|
|
32
|
+
* the auto-dispose CONFIG bit (effect() previously cleared it post-construction).
|
|
33
|
+
*/
|
|
34
|
+
export declare function createEffectNode<T>(fn: (prev?: T) => T, effectFn: (val: T, prev: T | undefined) => void | (() => void), errorFn: ((err: unknown, cleanup: () => void) => void | (() => void)) | undefined, type: number, notifyStatus: ((status?: number, error?: any) => void) | undefined, options: NodeOptions<T> | undefined): any;
|
|
22
35
|
export declare function signal<T>(v: T, options?: NodeOptions<T>): Signal<T>;
|
|
23
36
|
export declare function signal<T>(v: T, options?: NodeOptions<T>, firewall?: Computed<any>): FirewallSignal<T>;
|
|
24
37
|
export declare function optimisticSignal<T>(v: T, options?: NodeOptions<T>): Signal<T>;
|
|
@@ -53,8 +66,52 @@ export declare function setStrictRead(v: string | false): string | false;
|
|
|
53
66
|
* ```
|
|
54
67
|
*/
|
|
55
68
|
export declare function untrack<T>(fn: () => T, strictReadLabel?: string | false): T;
|
|
69
|
+
/**
|
|
70
|
+
* Bring a computed to a readable state: lazy/disposed nodes are (re)computed;
|
|
71
|
+
* an isPending() probe (`refresh`) additionally pulls the node fully up to
|
|
72
|
+
* date so its status flags reflect the current graph.
|
|
73
|
+
*/
|
|
74
|
+
export declare function prepareComputed(comp: Computed<unknown>, refresh: boolean): void;
|
|
75
|
+
/**
|
|
76
|
+
* Sentinel returned by readNodeFast when the plain-signal fast path does not
|
|
77
|
+
* apply and the caller must fall back to the full read().
|
|
78
|
+
*/
|
|
79
|
+
export declare const READ_SLOW: unique symbol;
|
|
80
|
+
/**
|
|
81
|
+
* read()'s plain-signal fast path as a standalone entry for hot callers
|
|
82
|
+
* (store traps). Safe to substitute for read() only because the bail
|
|
83
|
+
* conditions mirror read()'s prelude and fast-path guard exactly: the
|
|
84
|
+
* latestRead and pendingCheck windows run side-effectful hooks before the
|
|
85
|
+
* fast path, `_fn` nodes need prepareComputed, and firewall / override /
|
|
86
|
+
* snapshot / transition / lane / dev-strictRead state all take the full
|
|
87
|
+
* resolution. Anything slow returns READ_SLOW; the caller then calls read().
|
|
88
|
+
*/
|
|
89
|
+
export declare function readNodeFast<T>(el: Signal<T>): T | typeof READ_SLOW;
|
|
56
90
|
export declare function read<T>(el: Signal<T> | Computed<T>): T;
|
|
91
|
+
/**
|
|
92
|
+
* Store-rewrite setter guard: the rewrite parks writes in a pending backing
|
|
93
|
+
* (no setSignal at write time), so the owned-scope write protection must
|
|
94
|
+
* fire at the setter entry instead. Mirrors setSignal's guard condition
|
|
95
|
+
* minus the node-specific exemptions (ownedWrite/firewall), which don't
|
|
96
|
+
* apply to plain store setters.
|
|
97
|
+
*/
|
|
98
|
+
export declare function devGuardStoreSetterWrite(): void;
|
|
57
99
|
export declare function setSignal<T>(el: Signal<T> | Computed<T>, v: T | ((prev: T) => T)): T;
|
|
100
|
+
/**
|
|
101
|
+
* Suppresses automatic recomputation of `el` until the scheduler drains. Used
|
|
102
|
+
* when a manual write should win over dependency changes queued in the same
|
|
103
|
+
* tick. The MANUAL_WRITE flag is cleared by the pending-node drain; projection
|
|
104
|
+
* computeds don't commit values, but they still need the same end-of-tick
|
|
105
|
+
* cleanup point.
|
|
106
|
+
*/
|
|
107
|
+
export declare function suppressComputedRecompute(el: Computed<unknown>): void;
|
|
108
|
+
/**
|
|
109
|
+
* User-facing setter for the memo form of `createSignal(fn)`. Behaves like
|
|
110
|
+
* `setSignal`, but also cancels any pending recompute of the memo so the
|
|
111
|
+
* manual value wins over a value that would otherwise be produced by an
|
|
112
|
+
* upstream change in the same tick.
|
|
113
|
+
*/
|
|
114
|
+
export declare function setMemo<T>(el: Computed<T>, v: T | ((prev: T) => T)): T;
|
|
58
115
|
/**
|
|
59
116
|
* Executes `fn` with the given `owner` set as the current owner. Any reactive
|
|
60
117
|
* primitives (`createSignal`, `createMemo`, `createEffect`, `onCleanup`,
|
|
@@ -75,56 +132,15 @@ export declare function setSignal<T>(el: Signal<T> | Computed<T>, v: T | ((prev:
|
|
|
75
132
|
* ```
|
|
76
133
|
*/
|
|
77
134
|
export declare function runWithOwner<T>(owner: Owner | null, fn: () => T): T;
|
|
78
|
-
/**
|
|
79
|
-
* Update _pendingSignal when pending state changes. When the override clears
|
|
80
|
-
* (pending -> not pending), merge the sub-lane into the source's lane so
|
|
81
|
-
* isPending effects are blocked until the full scope resolves.
|
|
82
|
-
*/
|
|
83
|
-
export declare function updatePendingSignal(el: Signal<any> | Computed<any>): void;
|
|
84
135
|
export declare function staleValues<T>(fn: () => T, set?: boolean): T;
|
|
85
136
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* inside `fn` are still in flight.
|
|
89
|
-
*
|
|
90
|
-
* Useful inside a `<Loading>` boundary's children when you want to keep
|
|
91
|
-
* showing the previous resolved data instead of the fallback while the next
|
|
92
|
-
* value loads.
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```tsx
|
|
96
|
-
* <Loading fallback={<Skeleton />}>
|
|
97
|
-
* {/* During a transition, render the previous user instead of skeleton: *\/}
|
|
98
|
-
* <UserCard user={latest(() => user())} />
|
|
99
|
-
* </Loading>
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
export declare function latest<T>(fn: () => T): T;
|
|
103
|
-
/**
|
|
104
|
-
* Returns `true` if any reactive read inside `fn` is currently in a pending
|
|
105
|
-
* (async, not-yet-settled) state. Does not subscribe — pair with a tracked
|
|
106
|
-
* memo if you want to react to pending status changes.
|
|
137
|
+
* Invalidates one reactive source, forcing it to re-execute even if its inputs
|
|
138
|
+
* haven't changed.
|
|
107
139
|
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* ```tsx
|
|
113
|
-
* const pending = createMemo(() => isPending(() => user()));
|
|
114
|
-
*
|
|
115
|
-
* <button disabled={pending()}>{pending() ? "Saving…" : "Save"}</button>
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
export declare function isPending(fn: () => any): boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Forces a reactive source to re-execute, even if its inputs haven't changed.
|
|
121
|
-
*
|
|
122
|
-
* Two forms:
|
|
123
|
-
* - `refresh(memo)` — pass an accessor (memo / signal getter) and its
|
|
124
|
-
* underlying computation reruns.
|
|
125
|
-
* - `refresh(store)` — pass a *projected* store created from
|
|
126
|
-
* `createStore(fn, ...)` or `createProjection(...)` and the projection
|
|
127
|
-
* recomputes.
|
|
140
|
+
* Pass either a Solid-created accessor or a projected store created from
|
|
141
|
+
* `createStore(fn, ...)` / `createProjection(...)`. `refresh()` is a
|
|
142
|
+
* write-like invalidation operation: it does not read the target's value, and
|
|
143
|
+
* refreshing a plain signal accessor is a no-op.
|
|
128
144
|
*
|
|
129
145
|
* Use it to invalidate cached async values (e.g. force a re-fetch) without
|
|
130
146
|
* tearing the consumer down.
|
|
@@ -137,17 +153,4 @@ export declare function isPending(fn: () => any): boolean;
|
|
|
137
153
|
* <button onClick={() => refresh(user)}>Reload</button>
|
|
138
154
|
* ```
|
|
139
155
|
*/
|
|
140
|
-
export declare function refresh<T>(
|
|
141
|
-
/**
|
|
142
|
-
* Returns `true` while a `refresh()` call is in progress. Useful for showing
|
|
143
|
-
* a "refreshing" indicator distinct from the initial-load `<Loading>`
|
|
144
|
-
* fallback.
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* ```tsx
|
|
148
|
-
* <Show when={isRefreshing()}>
|
|
149
|
-
* <span class="badge">refreshing…</span>
|
|
150
|
-
* </Show>
|
|
151
|
-
* ```
|
|
152
|
-
*/
|
|
153
|
-
export declare function isRefreshing(): boolean;
|
|
156
|
+
export declare function refresh<T>(target: Refreshable<T>): void;
|
package/dist/types/core/dev.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export interface DevHooks {
|
|
|
6
6
|
onStoreNodeUpdate?: (state: any, property: PropertyKey, value: any, prev: any) => void;
|
|
7
7
|
}
|
|
8
8
|
export type DiagnosticSeverity = "warn" | "error";
|
|
9
|
-
export type DiagnosticCode = "STRICT_READ_UNTRACKED" | "PENDING_ASYNC_UNTRACKED_READ" | "PENDING_ASYNC_FORBIDDEN_SCOPE" | "
|
|
10
|
-
export type DiagnosticKind = "strict-read" | "async" | "write" | "lifecycle" | "owner";
|
|
9
|
+
export type DiagnosticCode = "STRICT_READ_UNTRACKED" | "PENDING_ASYNC_UNTRACKED_READ" | "PENDING_ASYNC_FORBIDDEN_SCOPE" | "REACTIVE_WRITE_IN_OWNED_SCOPE" | "ACTION_CALLED_IN_OWNED_SCOPE" | "RUN_WITH_DISPOSED_OWNER" | "NO_OWNER_CLEANUP" | "CLEANUP_IN_FORBIDDEN_SCOPE" | "SETTLED_CLEANUP_UNOWNED" | "FLUSH_IN_EFFECT_CALLBACK" | "PRIMITIVE_IN_FORBIDDEN_SCOPE" | "NO_OWNER_EFFECT" | "NO_OWNER_BOUNDARY" | "ASYNC_OUTSIDE_LOADING_BOUNDARY" | "INVALID_REFRESH_TARGET" | "INVALID_AFFECTS_TARGET" | "MISSING_EFFECT_FN" | "SYNC_NODE_RECEIVED_ASYNC" | "REACTIVITY_HALTED" | "INVARIANT_VIOLATION";
|
|
10
|
+
export type DiagnosticKind = "strict-read" | "async" | "write" | "lifecycle" | "owner" | "error";
|
|
11
11
|
export interface DiagnosticEvent {
|
|
12
12
|
sequence: number;
|
|
13
13
|
code: DiagnosticCode;
|
|
@@ -39,7 +39,22 @@ export interface Dev {
|
|
|
39
39
|
getObservers: typeof getObservers;
|
|
40
40
|
}
|
|
41
41
|
export declare const DEV: Dev;
|
|
42
|
+
/**
|
|
43
|
+
* Dev-mode internal consistency check. A failure means the reactive system
|
|
44
|
+
* contradicted itself (not that user code misbehaved) — see
|
|
45
|
+
* INTERNALS-ASYNC-STATE.md for the invariant catalog. Throws under __TEST__
|
|
46
|
+
* so the suite (and fuzzing) treats any violation as a hard failure; logs in
|
|
47
|
+
* dev builds so user apps degrade instead of crashing.
|
|
48
|
+
*/
|
|
49
|
+
export declare function assertInvariant(condition: boolean, name: string, message: string): void;
|
|
42
50
|
export declare function emitDiagnostic(event: Omit<DiagnosticEvent, "sequence">): DiagnosticEvent;
|
|
51
|
+
/**
|
|
52
|
+
* Shared strict-read diagnostics for core read() and the store proxy traps.
|
|
53
|
+
* Single source for the message text — the #2897 safeguard parity between
|
|
54
|
+
* memos and stores is exactly these firing identically from both paths.
|
|
55
|
+
*/
|
|
56
|
+
export declare function throwPendingUntrackedRead(strictReadLabel: string, fields?: Partial<Omit<DiagnosticEvent, "sequence" | "data">>): never;
|
|
57
|
+
export declare function warnStrictReadUntracked(strictReadLabel: string, fields?: Partial<Omit<DiagnosticEvent, "sequence">>): void;
|
|
43
58
|
export declare function registerGraph(value: any, owner: Owner | null): void;
|
|
44
59
|
export declare function clearSignals(node: Owner): void;
|
|
45
60
|
export declare function getChildren(owner: Owner): Owner[];
|
|
@@ -2,10 +2,10 @@ import type { Computed, NodeOptions, Owner } from "./types.js";
|
|
|
2
2
|
export interface Effect<T> extends Computed<T>, Owner {
|
|
3
3
|
_effectFn: (val: T, prev: T | undefined) => void | (() => void);
|
|
4
4
|
_errorFn?: (err: unknown, cleanup: () => void) => void;
|
|
5
|
-
_cleanup?: () => void;
|
|
6
5
|
_modified: boolean;
|
|
7
6
|
_prevValue: T | undefined;
|
|
8
7
|
_type: number;
|
|
8
|
+
_boundRunEffect?: () => void;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Effects are the leaf nodes of our reactive graph. When their sources change, they are
|
|
@@ -18,7 +18,6 @@ export declare function effect<T>(compute: (prev: T | undefined) => T, effect: (
|
|
|
18
18
|
schedule?: boolean;
|
|
19
19
|
}): void;
|
|
20
20
|
export interface TrackedEffect extends Computed<void> {
|
|
21
|
-
_cleanup?: () => void;
|
|
22
21
|
_modified: boolean;
|
|
23
22
|
_type: number;
|
|
24
23
|
_run: () => void;
|
|
@@ -1,4 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown by a tracked read whose value is currently pending (an async memo /
|
|
3
|
+
* `createSignal(asyncFn)` / projection / store derivation that hasn't settled
|
|
4
|
+
* yet). Surfacing through the reactive graph is what suspends the consumer
|
|
5
|
+
* scope — the nearest enclosing `<Loading>` boundary catches the throw and
|
|
6
|
+
* renders its fallback until the source resolves.
|
|
7
|
+
*
|
|
8
|
+
* App code rarely catches this directly; `<Loading>` is the canonical
|
|
9
|
+
* handler. The error type is exposed for advanced cases — e.g. interop layers
|
|
10
|
+
* that bridge Solid's pending-throw protocol to a different async strategy,
|
|
11
|
+
* or tests that want to assert on the suspension shape.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // Advanced: distinguish "not ready yet" from a real error in custom
|
|
16
|
+
* // boundary plumbing. App code should rely on `<Loading>` / `<Errored>`.
|
|
17
|
+
* try {
|
|
18
|
+
* const value = readReactiveSource();
|
|
19
|
+
* } catch (err) {
|
|
20
|
+
* if (err instanceof NotReadyError) throw err; // re-throw to suspend
|
|
21
|
+
* reportError(err);
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
1
25
|
export declare class NotReadyError extends Error {
|
|
26
|
+
/**
|
|
27
|
+
* Tags a visibility-only notification on the affects() boundary channel:
|
|
28
|
+
* boundaries update display state from it, but the root queue never
|
|
29
|
+
* registers a reporter — marks are invisible to completion accounting by
|
|
30
|
+
* construction.
|
|
31
|
+
*/
|
|
32
|
+
_markVisual?: boolean;
|
|
2
33
|
source: any;
|
|
3
34
|
constructor(source: any);
|
|
4
35
|
}
|
|
@@ -6,6 +37,8 @@ export declare class StatusError extends Error {
|
|
|
6
37
|
source: any;
|
|
7
38
|
constructor(source: any, original: any);
|
|
8
39
|
}
|
|
40
|
+
/** Return the user's error from an internal status wrapper. */
|
|
41
|
+
export declare function unwrapStatusError(error: unknown): unknown;
|
|
9
42
|
export declare class NoOwnerError extends Error {
|
|
10
43
|
constructor();
|
|
11
44
|
}
|
|
@@ -11,16 +11,5 @@ export declare let externalSourceConfig: {
|
|
|
11
11
|
factory: ExternalSourceFactory;
|
|
12
12
|
untrack: <T>(fn: () => T) => T;
|
|
13
13
|
} | null;
|
|
14
|
-
/**
|
|
15
|
-
* Registers a factory that bridges external reactive systems (e.g. MobX, Vue refs)
|
|
16
|
-
* into Solid's tracking graph. Every computation will be wrapped so that the
|
|
17
|
-
* external library can track its own dependencies alongside Solid's.
|
|
18
|
-
*
|
|
19
|
-
* Multiple calls pipe together: each new factory wraps the previous one.
|
|
20
|
-
*
|
|
21
|
-
* @param config.factory receives `(fn, trigger)` — wrap fn execution in external tracking,
|
|
22
|
-
* call trigger when external deps change. Return `{ track, dispose }`.
|
|
23
|
-
* @param config.untrack optional wrapper for `untrack` — disables external tracking too.
|
|
24
|
-
*/
|
|
25
14
|
export declare function enableExternalSource(config: ExternalSourceConfig): void;
|
|
26
15
|
export declare function _resetExternalSourceConfig(): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Computed, Link, Signal } from "./types.js";
|
|
2
2
|
export declare function unlinkSubs(link: Link): Link | null;
|
|
3
|
+
export declare function trimStaleDeps(el: Computed<any>): void;
|
|
3
4
|
export declare function unobserved(el: Computed<unknown>): void;
|
|
4
|
-
export declare function link(dep: Signal<any> | Computed<any>, sub: Computed<any
|
|
5
|
+
export declare function link(dep: Signal<any> | Computed<any>, sub: Computed<any>, pendingObserver?: boolean): void;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { Computed } from "./types.js";
|
|
2
|
+
/** The queue a node belongs to, picked from its own zombie flag. */
|
|
3
|
+
export declare function queueFor(n: Computed<any>): Heap;
|
|
4
|
+
/**
|
|
5
|
+
* Schedule one subscriber to re-run on the next flush: tracked effects bypass
|
|
6
|
+
* the heap and go directly to their effect queue; everything else is inserted
|
|
7
|
+
* into its own (zombie-flag-routed) heap with the `_min` cursor pulled down.
|
|
8
|
+
*/
|
|
9
|
+
export declare function enqueueSub(node: Computed<any>): void;
|
|
2
10
|
export interface Heap {
|
|
3
11
|
_heap: (Computed<unknown> | undefined)[];
|
|
4
12
|
_marked: boolean;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
export { ContextNotFoundError, NoOwnerError, NotReadyError } from "./error.js";
|
|
2
|
-
export { isEqual, untrack, runWithOwner, computed, signal, read, setSignal,
|
|
2
|
+
export { isEqual, untrack, runWithOwner, computed, signal, read, setSignal, setMemo, suppressComputedRecompute, optimisticSignal, optimisticComputed, refresh, staleValues, setSnapshotCapture, markSnapshotScope, releaseSnapshotScope, clearSnapshots } from "./core.js";
|
|
3
3
|
export { enableExternalSource, _resetExternalSourceConfig, type ExternalSourceFactory, type ExternalSource, type ExternalSourceConfig } from "./external.js";
|
|
4
4
|
export { createOwner, createRoot, dispose, getNextChildId, getObserver, getOwner, isDisposed, cleanup, peekNextChildId } from "./owner.js";
|
|
5
5
|
export { createContext, getContext, setContext, type Context, type ContextRecord } from "./context.js";
|
|
6
6
|
export { handleAsync } from "./async.js";
|
|
7
|
+
export { isPending, latest } from "./verdict.js";
|
|
7
8
|
export type { Computed, Disposable, FirewallSignal, Link, Owner, Root, Signal, NodeOptions } from "./types.js";
|
|
8
9
|
export { effect, trackedEffect, type Effect, type TrackedEffect } from "./effect.js";
|
|
9
10
|
export { action } from "./action.js";
|
|
10
|
-
export { flush, Queue, GlobalQueue,
|
|
11
|
+
export { flush, Queue, GlobalQueue, enforceLoadingBoundary, resetErrorHalt, type IQueue, type QueueCallback } from "./scheduler.js";
|
|
11
12
|
export { DEV, type Dev, type DevHooks, type DiagnosticCapture, type DiagnosticCode, type DiagnosticEvent, type DiagnosticKind, type Diagnostics, type DiagnosticSeverity } from "./dev.js";
|
|
12
13
|
export * from "./constants.js";
|