parse.d.ts 867 B

123456789101112131415161718
  1. import { type AnyNode, Document, type ParentNode } from 'domhandler';
  2. import type { InternalOptions } from './options.js';
  3. /**
  4. * Get the parse function with options.
  5. *
  6. * @param parser - The parser function.
  7. * @returns The parse function with options.
  8. */
  9. export declare function getParse(parser: (content: string, options: InternalOptions, isDocument: boolean, context: ParentNode | null) => Document): (content: string | Document | AnyNode | AnyNode[] | Buffer, options: InternalOptions, isDocument: boolean, context: ParentNode | null) => Document;
  10. /**
  11. * Update the dom structure, for one changed layer.
  12. *
  13. * @param newChilds - The new children.
  14. * @param parent - The new parent.
  15. * @returns The parent node.
  16. */
  17. export declare function update(newChilds: AnyNode[] | AnyNode, parent: ParentNode | null): ParentNode | null;
  18. //# sourceMappingURL=parse.d.ts.map