MultiplexHandler.d.ts 984 B

12345678910111213141516171819202122232425262728
  1. import type { Parser, Handler } from "./Parser";
  2. /**
  3. * Calls a specific handler function for all events that are encountered.
  4. */
  5. export default class MultiplexHandler implements Handler {
  6. private readonly func;
  7. /**
  8. * @param func The function to multiplex all events to.
  9. */
  10. constructor(func: (event: keyof Handler, ...args: unknown[]) => void);
  11. onattribute(name: string, value: string, quote: string | null | undefined): void;
  12. oncdatastart(): void;
  13. oncdataend(): void;
  14. ontext(text: string): void;
  15. onprocessinginstruction(name: string, value: string): void;
  16. oncomment(comment: string): void;
  17. oncommentend(): void;
  18. onclosetag(name: string): void;
  19. onopentag(name: string, attribs: {
  20. [key: string]: string;
  21. }): void;
  22. onopentagname(name: string): void;
  23. onerror(error: Error): void;
  24. onend(): void;
  25. onparserinit(parser: Parser): void;
  26. onreset(): void;
  27. }
  28. //# sourceMappingURL=MultiplexHandler.d.ts.map