type-alias / @typed/template/Render

ToRendered

Computes the DOM value represented by a nullable RenderEvent.

Package version
1.0.0-beta.7
Category
DOM output inference
Since
1.0.0

Import

import type { ToRendered } from "@typed/template/Render";

Signatures

export type ToRendered<T extends RenderEvent | null> = Rendered | (T extends null ? null : never);

Why

Root rendering preserves null in the public result when a source can render nothing, while non-null events expose their actual Rendered nodes.

Ownership and lifetime

This type-level projection does not own the nodes it describes.

Examples

import type { ToRendered } from "@typed/template/Render"
import type { DomRenderEvent } from "@typed/template/RenderEvent"

type Output = ToRendered<DomRenderEvent>

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source