Skip to content

fix(types): gate public JSDoc helpers (SD-2833)#3126

Merged
caio-pizzol merged 2 commits intomainfrom
caio-pizzol/SD-2833-public-jsdoc
May 4, 2026
Merged

fix(types): gate public JSDoc helpers (SD-2833)#3126
caio-pizzol merged 2 commits intomainfrom
caio-pizzol/SD-2833-public-jsdoc

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol commented May 4, 2026

Summary

  • widen check:jsdoc so gated files are repo-relative and validated against a derived public export graph for superdoc, superdoc/super-editor, and superdoc/ui
  • add the SD-2892 regression helpers (markInsertion, markDeletion, addMarkStep) to the checked JSDoc gate
  • add a consumer-typecheck fixture for trackChangesHelpers through superdoc/super-editor, covering omitted optional IDs and the minimal addMarkStep call shape under bundler/node16/nodenext with skipLibCheck:false
  • type those helper JSDoc blocks enough for // @ts-check without changing their consumer call shapes

Notes

This is the first shippable SD-2833 slice, not the full public-JSDoc drain. The checker now discovers 118 public JSDoc files and reports 114 still ungated, which gives us an explicit backlog while keeping this PR focused on the helper declarations that caused the SD-2892 review issue.

One important boundary: @ts-check catches JSDoc/source inconsistencies such as omitted destructured fields, but it does not reliably catch a runtime-optional field declared as required or an unused nested option declared in JSDoc. The new consumer fixture is the regression gate for that class because it compiles real public calls from the packed package.

@types/uuid is added to packages/super-editor dev dependencies because the newly checked helper files import uuid and TypeScript needs its declarations while running checkJs.

Verification

  • pnpm --filter superdoc check:jsdoc
  • pnpm --filter superdoc run build:es
  • node tests/consumer-typecheck/typecheck-matrix.mjs -> 47 passed, 0 failed, 0 warnings
  • pnpm run type-check
  • git diff --check

@linear
Copy link
Copy Markdown

linear Bot commented May 4, 2026

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol caio-pizzol marked this pull request as ready for review May 4, 2026 20:04
@caio-pizzol caio-pizzol requested a review from a team as a code owner May 4, 2026 20:04
@caio-pizzol caio-pizzol merged commit fdf5a91 into main May 4, 2026
72 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/SD-2833-public-jsdoc branch May 4, 2026 21:05
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.41

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in vscode-ext v2.3.0-next.85

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in @superdoc-dev/react v1.2.0-next.83

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in superdoc v1.30.0-next.42

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in superdoc-cli v0.8.0-next.59

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in superdoc-sdk v1.8.0-next.44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants