Skip to content

fix: revert TS 6 upgrade that broke type declarations - #187

Merged
kevinccbsg merged 1 commit into
mainfrom
fix/revert-ts6-empty-dts
Mar 31, 2026
Merged

kevinccbsg merged 1 commit into
mainfrom
fix/revert-ts6-empty-dts

Conversation

@kevinccbsg

Copy link
Copy Markdown
Member

Summary

  • Reverts TypeScript from 6.0.2 back to ~5.9.3 — TS 6 is incompatible with @microsoft/api-extractor (used by vite-plugin-dts rollupTypes), causing all .d.ts entry points to ship as empty export {}. This broke type-checking in consumer projects (e.g. vue example).
  • Adds a CI build job that verifies .d.ts files are not empty after build
  • Adds the same check to the publish workflow as a pre-publish safety gate
  • Adds a build step to the tutorial example CI to run tsc -b against copied dist
  • Adds a new Vue example CI workflow that runs vue-tsc -b against copied dist (bundled version)

Test plan

  • CI build job passes with valid .d.ts files
  • Vue example type-check workflow passes
  • Tutorial example build step passes
  • Verify locally: npm run build then check dist/index.d.ts has real exports

🤖 Generated with Claude Code

@kevinccbsg
kevinccbsg force-pushed the fix/revert-ts6-empty-dts branch 2 times, most recently from 9a58c00 to 0ee9fa6 Compare March 31, 2026 08:35
…hecks

TypeScript 6 is incompatible with @microsoft/api-extractor (used by
vite-plugin-dts rollupTypes), causing all .d.ts entry points to ship
as empty `export {}`. Reverts to TypeScript ~5.9.3.

CI changes:
- Add build job that verifies .d.ts files are not empty
- Add dts verification to publish workflow (pre-publish gate)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kevinccbsg
kevinccbsg force-pushed the fix/revert-ts6-empty-dts branch from 0ee9fa6 to b3f1fc5 Compare March 31, 2026 09:02
@kevinccbsg
kevinccbsg merged commit 82f5d20 into main Mar 31, 2026
7 checks passed
@kevinccbsg
kevinccbsg deleted the fix/revert-ts6-empty-dts branch March 31, 2026 09:09
kevinccbsg added a commit that referenced this pull request Nov 16, 2026
TypeScript 6 broke the declaration build in #187 because api-extractor did
not support it yet. api-extractor 7.60.1, added in #436, bundles TypeScript
6.0.3, and the build now emits the same declarations as on 5.9.

- Bump typescript from ~5.9.3 to ~6.0.3, the latest 6.x release.
- Drop baseUrl from tsconfig.json: TypeScript 6 deprecates it and nothing
  relies on it, as every import inside src/ is relative.

TypeScript 7 is still out of reach: its native compiler ships no JavaScript
API for vite-plugin-dts, and typescript-eslint refuses to run on it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant