index.d.ts 1001 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Transform a `parse5` AST to hast.
  3. *
  4. * @param {DefaultTreeAdapterMap['node']} tree
  5. * `parse5` tree to transform.
  6. * @param {Options | null | undefined} [options]
  7. * Configuration (optional).
  8. * @returns {Nodes}
  9. * hast tree.
  10. */
  11. export function fromParse5(tree: DefaultTreeAdapterMap["node"], options?: Options | null | undefined): Nodes;
  12. /**
  13. * Info passed around about the current state.
  14. */
  15. export type State = {
  16. /**
  17. * Corresponding file.
  18. */
  19. file: VFile | undefined;
  20. /**
  21. * Whether location info was found.
  22. */
  23. location: boolean;
  24. /**
  25. * Current schema.
  26. */
  27. schema: Schema;
  28. /**
  29. * Add extra positional info.
  30. */
  31. verbose: boolean | undefined;
  32. };
  33. import type { DefaultTreeAdapterMap } from 'parse5';
  34. import type { Options } from 'hast-util-from-parse5';
  35. import type { Nodes } from 'hast';
  36. import type { VFile } from 'vfile';
  37. import type { Schema } from 'property-information';
  38. //# sourceMappingURL=index.d.ts.map