Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/pages-editor/hooks/usePageDiagnostics

Cockpit client (features), next. Source: ui/client/features/pages-editor/hooks/usePageDiagnostics.tsx.

Type Aliases#

PageDiagnostics#

PageDiagnostics = { diagnostics: SourceDiagnostic[]; ok: true; } | { error: string; ok: false; }

Defined in: ui/client/features/pages-editor/hooks/usePageDiagnostics.tsx:7

Functions#

usePageDiagnostics()#

usePageDiagnostics(feature, file, contentHash): PageDiagnostics | null

Defined in: ui/client/features/pages-editor/hooks/usePageDiagnostics.tsx:12

The same /api/pages/source diagnostics the Source tab's usePageSource already reads -- a separate read here, not a shared one, the same way Impact/Tests/Findings each fetch independently; the whole file's diagnostics are fetched once per save, and scoped to the selected node in NodeDiagnostics.ts.

Parameters#

feature

string

file

string

contentHash

string

Returns#

PageDiagnostics | null