Files
docx/src/watermarks
DolanandClaude Opus 5.5 f12329161d fix: don't let a paragraph or a table type check as a paragraph's child (#2395) (#3790)
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>
2026-10-18 22:36:06 +01:00
..