import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface'; import { type DefaultTreeAdapterMap } from '../tree-adapters/default.js'; export interface SerializerOptions { /** * Specifies input tree format. * * @default `treeAdapters.default` */ treeAdapter?: TreeAdapter; /** * The [scripting flag](https://html.spec.whatwg.org/multipage/parsing.html#scripting-flag). If set * to `true`, `noscript` element content will not be escaped. * * @default `true` */ scriptingEnabled?: boolean; } /** * Serializes an AST node to an HTML string. * * @example * * ```js * const parse5 = require('parse5'); * * const document = parse5.parse('Hi there!'); * * // Serializes a document. * const html = parse5.serialize(document); * * // Serializes the element content. * const str = parse5.serialize(document.childNodes[1]); * * console.log(str); //> 'Hi there!' * ``` * * @param node Node to serialize. * @param options Serialization options. */ export declare function serialize(node: T['parentNode'], options?: SerializerOptions): string; /** * Serializes an AST element node to an HTML string, including the element node. * * @example * * ```js * const parse5 = require('parse5'); * * const document = parse5.parseFragment('
Hello, world!
'); * * // Serializes the
element. * const html = parse5.serializeOuter(document.childNodes[0]); * * console.log(str); //> '
Hello, world!
' * ``` * * @param node Node to serialize. * @param options Serialization options. */ export declare function serializeOuter(node: T['node'], options?: SerializerOptions): string; //# sourceMappingURL=index.d.ts.map