@solidjs/signals 0.13.11 → 0.13.13
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 +323 -91
- package/dist/node.cjs +1150 -1139
- package/dist/prod.js +827 -810
- package/dist/types/core/dev.d.ts +26 -0
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/core/scheduler.d.ts +1 -1
- package/dist/types/index.d.ts +4 -2
- package/package.json +1 -1
package/dist/types/core/dev.d.ts
CHANGED
|
@@ -5,8 +5,33 @@ export interface DevHooks {
|
|
|
5
5
|
onUpdate?: () => void;
|
|
6
6
|
onStoreNodeUpdate?: (state: any, property: PropertyKey, value: any, prev: any) => void;
|
|
7
7
|
}
|
|
8
|
+
export type DiagnosticSeverity = "warn" | "error";
|
|
9
|
+
export type DiagnosticCode = "STRICT_READ_UNTRACKED" | "PENDING_ASYNC_UNTRACKED_READ" | "PENDING_ASYNC_FORBIDDEN_SCOPE" | "SIGNAL_WRITE_IN_OWNED_SCOPE" | "RUN_WITH_DISPOSED_OWNER" | "NO_OWNER_CLEANUP" | "CLEANUP_IN_FORBIDDEN_SCOPE" | "NO_OWNER_EFFECT" | "NO_OWNER_BOUNDARY" | "ASYNC_OUTSIDE_LOADING_BOUNDARY";
|
|
10
|
+
export type DiagnosticKind = "strict-read" | "async" | "write" | "lifecycle" | "owner";
|
|
11
|
+
export interface DiagnosticEvent {
|
|
12
|
+
sequence: number;
|
|
13
|
+
code: DiagnosticCode;
|
|
14
|
+
kind: DiagnosticKind;
|
|
15
|
+
severity: DiagnosticSeverity;
|
|
16
|
+
message: string;
|
|
17
|
+
ownerId?: string;
|
|
18
|
+
ownerName?: string;
|
|
19
|
+
nodeName?: string;
|
|
20
|
+
data?: Record<string, unknown>;
|
|
21
|
+
}
|
|
22
|
+
export type DiagnosticListener = (event: DiagnosticEvent) => void;
|
|
23
|
+
export interface DiagnosticCapture {
|
|
24
|
+
readonly events: readonly DiagnosticEvent[];
|
|
25
|
+
clear(): void;
|
|
26
|
+
stop(): DiagnosticEvent[];
|
|
27
|
+
}
|
|
28
|
+
export interface Diagnostics {
|
|
29
|
+
subscribe(listener: DiagnosticListener): () => void;
|
|
30
|
+
capture(): DiagnosticCapture;
|
|
31
|
+
}
|
|
8
32
|
export interface Dev {
|
|
9
33
|
hooks: DevHooks;
|
|
34
|
+
diagnostics: Diagnostics;
|
|
10
35
|
getChildren: typeof getChildren;
|
|
11
36
|
getSignals: typeof getSignals;
|
|
12
37
|
getParent: typeof getParent;
|
|
@@ -14,6 +39,7 @@ export interface Dev {
|
|
|
14
39
|
getObservers: typeof getObservers;
|
|
15
40
|
}
|
|
16
41
|
export declare const DEV: Dev;
|
|
42
|
+
export declare function emitDiagnostic(event: Omit<DiagnosticEvent, "sequence">): DiagnosticEvent;
|
|
17
43
|
export declare function registerGraph(value: any, owner: Owner | null): void;
|
|
18
44
|
export declare function clearSignals(node: Owner): void;
|
|
19
45
|
export declare function getChildren(owner: Owner): Owner[];
|
|
@@ -8,5 +8,5 @@ export type { Computed, Disposable, FirewallSignal, Link, Owner, Root, Signal, N
|
|
|
8
8
|
export { effect, trackedEffect, type Effect, type TrackedEffect } from "./effect.js";
|
|
9
9
|
export { action } from "./action.js";
|
|
10
10
|
export { flush, Queue, GlobalQueue, trackOptimisticStore, enforceLoadingBoundary, type IQueue, type QueueCallback } from "./scheduler.js";
|
|
11
|
-
export { DEV, type Dev, type DevHooks } from "./dev.js";
|
|
11
|
+
export { DEV, type Dev, type DevHooks, type DiagnosticCapture, type DiagnosticCode, type DiagnosticEvent, type DiagnosticKind, type Diagnostics, type DiagnosticSeverity } from "./dev.js";
|
|
12
12
|
export * from "./constants.js";
|
|
@@ -22,7 +22,7 @@ type QueueStub = {
|
|
|
22
22
|
type OptimisticNode = Signal<any> | Computed<any>;
|
|
23
23
|
export interface Transition {
|
|
24
24
|
_time: number;
|
|
25
|
-
|
|
25
|
+
_asyncReporters: Map<Computed<any>, Set<Computed<any>>>;
|
|
26
26
|
_pendingNodes: Signal<any>[];
|
|
27
27
|
_optimisticNodes: OptimisticNode[];
|
|
28
28
|
_optimisticStores: Set<any>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export { $REFRESH, ContextNotFoundError, NoOwnerError, NotReadyError, action, createContext, createOwner, createRoot, runWithOwner, flush, getNextChildId, peekNextChildId, getContext, setContext, getOwner, isDisposed, getObserver, isEqual, untrack, isPending, latest, isRefreshing, refresh, SUPPORTS_PROXY, setSnapshotCapture, markSnapshotScope, releaseSnapshotScope, clearSnapshots, enforceLoadingBoundary, enableExternalSource
|
|
2
|
-
|
|
1
|
+
export { $REFRESH, ContextNotFoundError, NoOwnerError, NotReadyError, action, createContext, createOwner, createRoot, runWithOwner, flush, getNextChildId, peekNextChildId, getContext, setContext, getOwner, isDisposed, getObserver, isEqual, untrack, isPending, latest, isRefreshing, refresh, SUPPORTS_PROXY, setSnapshotCapture, markSnapshotScope, releaseSnapshotScope, clearSnapshots, enforceLoadingBoundary, enableExternalSource } from "./core/index.js";
|
|
2
|
+
import { type Dev } from "./core/index.js";
|
|
3
|
+
export declare const DEV: Dev | undefined;
|
|
4
|
+
export type { Owner, Context, ContextRecord, IQueue, ExternalSourceFactory, ExternalSource, ExternalSourceConfig, Dev, DevHooks, DiagnosticCapture, DiagnosticCode, DiagnosticEvent, DiagnosticKind, Diagnostics, DiagnosticSeverity } from "./core/index.js";
|
|
3
5
|
export { createSignal, createMemo, createEffect, createRenderEffect, createTrackedEffect, createReaction, createOptimistic, resolve, onSettled, onCleanup } from "./signals.js";
|
|
4
6
|
export type { Accessor, Setter, Signal, ComputeFunction, EffectFunction, EffectBundle, EffectOptions, SignalOptions, MemoOptions, NoInfer } from "./signals.js";
|
|
5
7
|
export { mapArray, repeat, type Maybe } from "./map.js";
|