fix(types): gate public surface without skipLibCheck#3114
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.
|
🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.40 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.3.0-next.84 |
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.82 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.30.0-next.41 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-cli v0.8.0-next.58 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-sdk v1.8.0-next.43 |
|
🎉 This PR is included in superdoc-cli v0.9.0 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.32.0 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/mcp v0.4.0 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/react v1.3.0 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.4.0 |
|
🎉 This PR is included in superdoc-sdk v1.9.0 |
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