Repository navigation
chore: Enable isolatedDeclarations - #991
Closed
armandabric wants to merge 1 commit into
Closed
armandabric wants to merge 1 commit into
armandabric wants to merge 1 commit into
Conversation
With isolatedDeclarations, tsdown generates the declarations with Oxc instead of TypeScript, so the build no longer depends on the TypeScript API or the tsgo binary. The generated declarations are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Up to standards ✅🟢 Issues
|
Collaborator
Author
|
Moved into #990. |
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.
Enables
isolatedDeclarationsintsconfig.json.Why
When
isolatedDeclarationsis on, tsdown (throughrolldown-plugin-dts) generatesdist/index.d.tswith Oxc instead of TypeScript. The build then no longer depends on the TypeScript API or on thetsgobinary:rolldown-plugin-dtsonly supports~7.0.0for now);tscstill enforces the rule, so code that Oxc can't handle is reported bypnpm run typecheckand in the editor.Changes
createPropFilter: explicit return type.defaultOptions: typed asOptions.tsdown.config.ts/vitest.config.ts: the default export is a typed constant, because these files are part of the tsconfig andisolatedDeclarationscan't infer default exports.dist/index.jsanddist/index.d.tsare byte-identical to the current build.Independent of #990: this works with TypeScript 6 and 7.
Checks
pnpm run typecheckpnpm run test(215 tests)pnpm run build(attw and publint pass, declarations generated by Oxc)pnpm run lint/pnpm run format🤖 Generated with Claude Code