fix(types): gate public surface without skipLibCheck#3114
Merged
caio-pizzol merged 3 commits intomainfrom May 4, 2026
Merged
Conversation
SD-2892: add packed-tarball consumer typecheck scenarios that compile the full public fixture set with skipLibCheck=false under bundler, node16, and nodenext. Fix the declaration issues exposed by that gate: publish the public mdast/ws type dependencies, emit NodeNext-safe relative declaration specifiers, keep Vue SFC declarations resolvable, and tighten JSDoc-generated declarations. Vue is published as ^3.5.0 because catalog: cannot survive npm packaging and exact patch installs duplicate Vue global macro declarations in consumers. @types/ws stays a dependency because @hocuspocus/provider peer declarations require it under skipLibCheck=false; @types/mdast is directly referenced by public markdown helper declarations.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…SD-2892) JSDoc tightening in 56dac0d inadvertently required options.id on markInsertion/markDeletion (the runtime treats it as optional) and required options.tr/options.map on addMarkStep (which never destructures them). Mark id optional with bracket syntax and drop the unused tr/map declarations so the emitted public d.ts matches the runtime contract.
Contributor
|
🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.40 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in vscode-ext v2.3.0-next.84 |
Contributor
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.82 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc v1.30.0-next.41 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc-cli v0.8.0-next.58 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc-sdk v1.8.0-next.43 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
skipLibCheck: falseunderbundler,node16, andnodenext@types/mdastfor markdown helper declarations and@types/wsfor@hocuspocus/providerpeer declarationsNotes
vueis published as^3.5.0instead ofcatalog:because catalog references cannot survive npm packaging and exact patch installs can duplicate Vue global macro declarations in consumer projects. Future Vue catalog bumps should be mirrored here intentionally.@types/wsis a dependency rather than an optional peer because the strict public-surface matrix resolves@hocuspocus/providerdeclarations even before a consumer uses collaboration at runtime. Installing the small type package keepsskipLibCheck: falseconsumers green without adding another peer prompt.Verification
node tests/consumer-typecheck/typecheck-matrix.mjs->44 passed, 0 failed, 0 warningspnpm --filter superdoc check:jsdocpnpm run type-checkpnpm --filter superdoc run pack:es/tmp/sd-2892-minimal-app:./node_modules/.bin/tsc -p tsconfig.json --noEmit(NodeNext,skipLibCheck: false)./node_modules/.bin/tsc -p tsconfig.node16.json --noEmit(Node16,skipLibCheck: false)./node_modules/.bin/tsc -p tsconfig.bundler.json --noEmit(Bundler,skipLibCheck: false)git diff --check