mirror of
https://github.com/dolanmiu/docx.git
synced 2026-12-01 16:55:59 +01:00
Some of ParagraphChild's classes, such as CommentRangeStart, Math and SimpleField, have no members of their own. TypeScript compares classes by their members, so any component, a Paragraph or a Table included, type checked as one of them, and as a paragraph's child. Word can't open the document that writes. Each of them now has a private member that is only in the type, so only it and its subclasses match it. That showed what else relied on the gap: - Textbox is documented as a paragraph's child, so it is now in ParagraphChild. - A Textbox's children go in w:txbxContent, which holds paragraphs and tables, as its docs show, so they are now typed as those, not as runs. - ImageWatermark and TextWatermark now extend Run, as ShapeRun and ChartRun do, so they stay paragraph children. They write the same XML. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>