export declare enum AstKind { Root = "Root", Child = "Child", Attribute = "Attribute", Composite = "Composite" } export declare enum ChildType { Node = "Node", Text = "Text", Data = "Data" } export declare enum AttributeType { Text = "Text", Data = "Data", Composite = "Composite" } export type AstChild = { kind: AstKind.Child; type: ChildType.Node; tag: string; children: AstChild[]; attributes: AstAttribute[]; } | { kind: AstKind.Child; type: ChildType.Text; value: string; } | { kind: AstKind.Child; type: ChildType.Data; value: T; }; export type AstAttribute = { kind: AstKind.Attribute; type: AttributeType.Text; key: string; value: string; } | { kind: AstKind.Attribute; type: AttributeType.Data; key: string; value: T; } | { kind: AstKind.Attribute; type: AttributeType.Composite; key: string; value: AstAttributeComposite[]; }; export type AstAttributeComposite = { kind: AstKind.Composite; type: AttributeType.Text; value: string; } | { kind: AstKind.Composite; type: AttributeType.Data; value: T; }; export type AstRoot = { kind: AstKind.Root; children: AstChild[]; };