parse5-adapter.d.ts 923 B

1234567891011121314151617181920
  1. import { type AnyNode, type Document, type ParentNode } from 'domhandler';
  2. import type { InternalOptions } from '../options.js';
  3. /**
  4. * Parse the content with `parse5` in the context of the given `ParentNode`.
  5. *
  6. * @param content - The content to parse.
  7. * @param options - A set of options to use to parse.
  8. * @param isDocument - Whether to parse the content as a full HTML document.
  9. * @param context - The context in which to parse the content.
  10. * @returns The parsed content.
  11. */
  12. export declare function parseWithParse5(content: string, options: InternalOptions, isDocument: boolean, context: ParentNode | null): Document;
  13. /**
  14. * Renders the given DOM tree with `parse5` and returns the result as a string.
  15. *
  16. * @param dom - The DOM tree to render.
  17. * @returns The rendered document.
  18. */
  19. export declare function renderWithParse5(dom: AnyNode | ArrayLike<AnyNode>): string;
  20. //# sourceMappingURL=parse5-adapter.d.ts.map