(node: VNode, options?: { showId?: boolean })
| 9 | import { ui } from "../widgets/ui.js"; |
| 10 | |
| 11 | export function debug(node: VNode, options?: { showId?: boolean }): VNode { |
| 12 | const id = getNodeId(node); |
| 13 | const label = options?.showId !== false && id ? ` ${id} ` : ""; |
| 14 | |
| 15 | return ui.box( |
| 16 | { |
| 17 | border: "single", |
| 18 | title: label, |
| 19 | }, |
| 20 | [node], |
| 21 | ); |
| 22 | } |
| 23 | |
| 24 | export function inspect(value: unknown, options?: { depth?: number }): VNode { |
| 25 | const text = formatValue(value, options?.depth ?? 3, 0); |
no test coverage detected