Advanced / Diagnostics & Dev Hooks

DEV

DEV API reference.


Import

import { DEV } from "solid-js";

Type signature

const DEV: Dev;

Dev

interface Dev {
hooks: DevHooks;
diagnostics: Diagnostics;
getChildren: typeof getChildren;
getSignals: typeof getSignals;
getParent: typeof getParent;
getSources: typeof getSources;
getObservers: typeof getObservers;
}

hooks

  • Type: DevHooks

diagnostics

  • Type: Diagnostics

getChildren

  • Type: typeof getChildren

getSignals

  • Type: typeof getSignals

getParent

  • Type: typeof getParent

getSources

  • Type: typeof getSources

getObservers

  • Type: typeof getObservers

DevHooks

interface DevHooks {
onOwner?: (owner: Owner) => void;
onGraph?: (value: any, owner: Owner | null) => void;
onUpdate?: () => void;
onStoreNodeUpdate?: (
state: any,
property: PropertyKey,
value: any,
prev: any
) => void;
}

onOwner

  • Type: (owner: Owner) => void

onGraph

  • Type: (value: any, owner: Owner | null) => void

onUpdate

  • Type: () => void

onStoreNodeUpdate

  • Type: (state: any, property: PropertyKey, value: any, prev: any) => void

DiagnosticCapture

interface DiagnosticCapture {
readonly events: readonly DiagnosticEvent[];
clear(): void;
stop(): DiagnosticEvent[];
}

events

  • Type: readonly DiagnosticEvent[]

clear

  • Type: void

stop

  • Type: DiagnosticEvent[]

DiagnosticCode

type DiagnosticCode =
| "STRICT_READ_UNTRACKED"
| "PENDING_ASYNC_UNTRACKED_READ"
| "PENDING_ASYNC_FORBIDDEN_SCOPE"
| "REACTIVE_WRITE_IN_OWNED_SCOPE"
| "RUN_WITH_DISPOSED_OWNER"
| "NO_OWNER_CLEANUP"
| "CLEANUP_IN_FORBIDDEN_SCOPE"
| "SETTLED_CLEANUP_UNOWNED"
| "PRIMITIVE_IN_FORBIDDEN_SCOPE"
| "NO_OWNER_EFFECT"
| "NO_OWNER_BOUNDARY"
| "ASYNC_OUTSIDE_LOADING_BOUNDARY"
| "INVALID_REFRESH_TARGET"
| "MISSING_EFFECT_FN"
| "SYNC_NODE_RECEIVED_ASYNC";

DiagnosticEvent

interface DiagnosticEvent {
sequence: number;
code: DiagnosticCode;
kind: DiagnosticKind;
severity: DiagnosticSeverity;
message: string;
ownerId?: string;
ownerName?: string;
nodeName?: string;
data?: Record<string, unknown>;
}

sequence

  • Type: number

code

  • Type: DiagnosticCode

kind

  • Type: DiagnosticKind

severity

  • Type: DiagnosticSeverity

message

  • Type: string

ownerId

  • Type: string

ownerName

  • Type: string

nodeName

  • Type: string

data

  • Type: Record&lt;string, unknown&gt;

DiagnosticKind

type DiagnosticKind = "strict-read" | "async" | "write" | "lifecycle" | "owner";

Diagnostics

interface Diagnostics {
subscribe(listener: DiagnosticListener): () => void;
capture(): DiagnosticCapture;
}

subscribe

  • Type: () => void

capture

  • Type: DiagnosticCapture

DiagnosticSeverity

type DiagnosticSeverity = "warn" | "error";
Last updated: 7/4/26, 6:21 PMEdit this pageReport an issue with this page