Document fragment or a whole document.

Should be used as the root of a tree and must not be used as a child.

Can also be used as the value for the content field on a 'template' element.

interface Root {
    children: RootContent[];
    data?: RootData;
    position?: Position;
    type: "root";
}

Hierarchy (view full)

Properties

children: RootContent[]

Children of root.

data?: RootData

Data associated with the hast root.

position?: Position

Position of a node in a source document.

Nodes that are generated (not in the original source document) must not have a position.

type: "root"

Node type of hast root.