wdpr
    Preparing search index...

    Type Alias Element

    Element: { [K in ElementName]: ElementOf<K> }[ElementName]

    A single AST node. Tagged union over all element types.

    Use element.element to discriminate, then access element.data with the appropriate type.

    if (el.element === "text") {
    console.log(el.data); // string
    } else if (el.element === "container") {
    console.log(el.data.type); // ContainerType
    }