From 76cb9c2a39d477a64824a985ade40507e3bbade1 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Fri, 13 Feb 2026 21:34:48 -0800 Subject: feat(vanilla): add testing infrastructure and tests (NK-wjnczv) --- .../node_modules/parse5/dist/serializer/index.d.ts | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 vanilla/node_modules/parse5/dist/serializer/index.d.ts (limited to 'vanilla/node_modules/parse5/dist/serializer/index.d.ts') diff --git a/vanilla/node_modules/parse5/dist/serializer/index.d.ts b/vanilla/node_modules/parse5/dist/serializer/index.d.ts new file mode 100644 index 0000000..995b3d7 --- /dev/null +++ b/vanilla/node_modules/parse5/dist/serializer/index.d.ts @@ -0,0 +1,60 @@ +import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; +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 str = 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; -- cgit v1.2.3