semantic_tree.d.ts 882 B

123456789101112131415161718192021
  1. import { SemanticMeaningCollator } from './semantic_default.js';
  2. import { SemanticNode } from './semantic_node.js';
  3. import { SemanticParser } from './semantic_parser.js';
  4. import './semantic_heuristics.js';
  5. export declare class SemanticTree {
  6. mathml: Element;
  7. parser: SemanticParser<Element>;
  8. root: SemanticNode;
  9. collator: SemanticMeaningCollator;
  10. static empty(): SemanticTree;
  11. static fromNode(semantic: SemanticNode, opt_mathml?: Element): SemanticTree;
  12. static fromRoot(semantic: SemanticNode, opt_mathml?: Element): SemanticTree;
  13. static fromXml(xml: Element): SemanticTree;
  14. constructor(mathml: Element);
  15. xml(opt_brief?: boolean): Element;
  16. toString(opt_brief?: boolean): string;
  17. formatXml(opt_brief?: boolean): string;
  18. displayTree(): void;
  19. replaceNode(oldNode: SemanticNode, newNode: SemanticNode): void;
  20. toJson(): any;
  21. }