type-alias / @typed/template

ParentNode

Represents an AST node that can structurally contain template children.

Package version
1.0.0-beta.13
Category
Element structure
Since
1.0.0

Import

import type { ParentNode } from "@typed/template";

Signatures

export type ParentNode = ElementNode | SelfClosingElementNode | TextOnlyElement;

Why

Renderer compilers can narrow parent-capable syntax without duplicating the full node union.

Ownership and lifetime

This type owns no parsed node or live DOM.

Examples

import { ElementNode, type ParentNode } from "@typed/template/Template"

const parent: ParentNode = new ElementNode("section", [], [])

Other public imports

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

Source