Problem
types-smoke.ts currently exercises only the core extraction and rendering paths. Several type contracts added in 0.3.0 are not exercised, so regressions would pass the types:check script silently.
Missing coverage
MantisSection.object — the "section" discriminator added in 0.3.0 is not asserted
MantisSelection shape — object, text, note, createdAt, source fields
MantisInlineRun union — all five type values ("text", "link", "code", "strong", "em") and the conditional href on link runs
MantisBlock.list — depth, ordered, index on list_item blocks
MantisBlock.language — optional field on code blocks
MantisCitation.hrefs and offset fields
MantisLink.rel and source fields
MantisImage.title and source fields
MantisTable.caption, headers, rows fields
MantisFromHTMLOptions — verify DOMParser shape is assignable
MantisMarkdownOptions — all option fields (frontmatter, images, tables, maxChars, budget)
MantisExtractOptions — all option fields
Suggested fix
Add typed variable assignments in types-smoke.ts that exercise each interface field, mirroring the pattern already used for MantisArticle. TypeScript's structural checking will catch missing or mistyped fields at compile time without needing a runtime test.
Problem
types-smoke.tscurrently exercises only the core extraction and rendering paths. Several type contracts added in 0.3.0 are not exercised, so regressions would pass thetypes:checkscript silently.Missing coverage
MantisSection.object— the"section"discriminator added in 0.3.0 is not assertedMantisSelectionshape —object,text,note,createdAt,sourcefieldsMantisInlineRununion — all fivetypevalues ("text","link","code","strong","em") and the conditionalhrefon link runsMantisBlock.list—depth,ordered,indexonlist_itemblocksMantisBlock.language— optional field oncodeblocksMantisCitation.hrefsandoffsetfieldsMantisLink.relandsourcefieldsMantisImage.titleandsourcefieldsMantisTable.caption,headers,rowsfieldsMantisFromHTMLOptions— verifyDOMParsershape is assignableMantisMarkdownOptions— all option fields (frontmatter,images,tables,maxChars,budget)MantisExtractOptions— all option fieldsSuggested fix
Add typed variable assignments in
types-smoke.tsthat exercise each interface field, mirroring the pattern already used forMantisArticle. TypeScript's structural checking will catch missing or mistyped fields at compile time without needing a runtime test.