/** * VNode normalization utilities. * Converts render results into proper VNode structures. */ import { VNode, JSXElement } from '../jsx-runtime.js'; /** * Normalize render result to a VNode (wrapping arrays in Fragment). * Handles null, undefined, false, true by returning an empty Text node. * * This is used to normalize the return value of component render functions * into a consistent VNode structure for the renderer to process. * * @example * ```ts * // Conditional rendering returns null/false * normalizeSubTree(null) // → empty Text node * normalizeSubTree(false) // → empty Text node * * // Arrays become Fragments * normalizeSubTree([, ]) // → Fragment with children * * // Primitives become Text nodes * normalizeSubTree("hello") // → Text node * normalizeSubTree(42) // → Text node * * // Computed signals are auto-unwrapped * normalizeSubTree(computed(() => "hi")) // → Text node with "hi" * * // VNodes pass through * normalizeSubTree(
) // → same VNode * ``` */ export declare function normalizeSubTree(result: JSXElement | JSXElement[] | null | undefined | boolean | (() => any)): VNode; //# sourceMappingURL=normalize.d.ts.map