import * as files from "../filesystem/index.js"; export type NodeAttributes = Record; export interface NodeScaffoldData { attributes?: NodeAttributes; content?: string; file?: files.FullFilePath | string; line?: number; sourceDir?: string; tag?: NodeTag; type?: NodeType; } export type NodeScaffoldDataReadonly = Readonly; /** the HTML tags */ export type NodeTag = "" | "/a" | "/b" | "/code" | "/pre" | "a" | "b" | "br" | "code" | "hr" | "i" | "img" | "li" | "ol" | "p" | "pre" | "ul"; /** the MarkdownIt node types */ export type NodeType = "anchor_close" | "anchor_open" | "bold_close" | "bold_open" | "bullet_list_close" | "bullet_list_open" | "code_close" | "code_open" | "fence_close" | "fence_open" | "h1_close" | "h1_open" | "h2_close" | "h2_open" | "h3_close" | "h3_open" | "h4_close" | "h4_open" | "h5_close" | "h5_open" | "h6_close" | "h6_open" | "heading_close" | "heading_open" | "hr" | "htmltag" | "image" | "linebreak" | "link_close" | "link_open" | "paragraph_close" | "paragraph_open" | "text"; /** a node in the standardized Markdown/HTML AST */ export declare class Node { /** the attributes of the node */ readonly attributes: NodeAttributes; /** textual content of this AST node */ readonly content: string; /** the file in which this AstNode occurs */ readonly location: files.Location; /** HTML type of AST node */ readonly tag: NodeTag; /** markdown type of AST node */ type: NodeType; constructor(data: { attributes: NodeAttributes; content: string; location: files.Location; tag: NodeTag; type: NodeType; }); static scaffold(data?: NodeScaffoldData): Node; /** Returns the type of the corresponding ending node. */ endType(): string; /** * Returns the content of the "href" attribute for link tags, * null otherwise. */ htmlLinkTarget(): null | string; /** Returns whether this AstNode is a closing node. */ isClosingNode(): boolean; /** Returns whether this AstNode is an opening node. */ isOpeningNode(): boolean; } //# sourceMappingURL=node.d.ts.map