import { Document, DocumentFragment } from 'flyweight-dom';
import type { ParserOptions, ResolvedParserOptions } from './types.js';
/**
 * Parses text as a DOM.
 *
 * @group DOM
 */
export interface DOMParser {
    /**
     * Parses text as a document.
     *
     * @param input The text to parse.
     * @returns The document node.
     */
    parseDocument(input: string): Document;
    /**
     * Parses text as a document fragment.
     *
     * @param input The text to parse.
     * @returns The document fragment node.
     */
    parseFragment(input: string): DocumentFragment;
}
/**
 * Parses text as a DOM.
 *
 * @example
 * import { createDOMParser, htmlTokenizerOptions } from 'tag-soup';
 *
 * const parser = createDOMParser(htmlTokenizerOptions);
 *
 * parser.parseFragment('Hello, <b>Bob</b>!');
 * // ⮕ DocumentFragment
 *
 * @param options Parser options.
 * @group DOM
 */
export declare function createDOMParser(options?: ParserOptions): DOMParser;
/**
 * Parses text as a DOM.
 *
 * @param input The text to parse.
 * @param options Parser options.
 * @returns The document or document fragment node.
 */
export declare function parseDOM(input: string, options?: ResolvedParserOptions): Document | DocumentFragment;
