export type HtmlAttribute = { name: string; value: string; prefix?: string; namespace?: string; }; export type HtmlElement = { type: 'element'; name: string; namespace: string; attributes: HtmlAttribute[]; children: HtmlNode[]; }; export type HtmlText = { type: 'text'; value: string; }; export type HtmlNode = HtmlElement | HtmlText; export declare class HtmlError extends Error { readonly code: 'parser-unavailable'; constructor(code: 'parser-unavailable'); } /** * A fragment parsed as WHATWG fragment parsing does in an HTML `
` context: elements and text, comments dropped, * an HTML ``'s content carried as that element's children. Importing this module does not load the grammar. */ export declare function parseFragment(source: string): Promise