parse.d.ts 888 B

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