Abstract hast node that contains the smallest possible value.

This interface is supposed to be extended if you make custom hast nodes.

For a union of all registered hast literals, see Literals.

interface Literal {
    data?: Data;
    position?: Position;
    type: string;
    value: string;
}

Hierarchy (view full)

Properties

data?: Data

Info from the ecosystem.

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: string

Node type.

value: string

Plain-text value.