* Converts the math node into a string, similar to innerText. Applies to * MathDomNode's only.
()
| 68 | * MathDomNode's only. |
| 69 | */ |
| 70 | toText(): string { |
| 71 | return this.children.map((child: ChildType): string => { |
| 72 | if (isMathDomNode(child)) { |
| 73 | return child.toText(); |
| 74 | } |
| 75 | throw new Error( |
| 76 | `Expected MathDomNode with toText, got ${child.constructor.name}`); |
| 77 | }).join(""); |
| 78 | } |
| 79 | } |
nothing calls this directly
no test coverage detected