-
-
Notifications
You must be signed in to change notification settings - Fork 53
feat(dts): support dts.tsgo
#1205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rslib ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the experimental dts.experiments.tsgo option, enabling users to generate TypeScript declaration files using the tsgo tool instead of the traditional TypeScript Compiler API.
- Introduces
dts.experiments.tsgoconfiguration option to enable tsgo-based declaration file generation - Adds comprehensive test coverage for both bundled and unbundled declaration files with tsgo
- Updates documentation to explain the new experimental feature and its usage
Reviewed Changes
Copilot reviewed 138 out of 142 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/types/config.ts | Adds TypeScript type definitions for the new experiments.tsgo option |
| packages/plugin-dts/src/tsgo.ts | Implements the tsgo integration with process spawning and output handling |
| packages/plugin-dts/src/utils.ts | Adds utilities for file renaming and source map content updates |
| website/docs/**/*.mdx | Updates documentation to describe the new tsgo experimental feature |
| tests/integration/dts-tsgo/** | Adds comprehensive test cases for tsgo functionality |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
website/docs/en/config/lib/dts.mdx:1
- The link to the TypeScript PR is incorrect. Based on the implementation, this should link to the tsgo repository at https://github.com/microsoft/typescript-go instead of the TypeScript PR.
---
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dts.experiments.tsgodts.tsgo
Summary
Support
dts.tsgo.Example: perf improvement for
@rsbuild/coredts.tsgo
booleanfalseWhether to generate declaration files with tsgo, which can provide faster generation of declaration files, especially for large projects.
Tip
This feature is currently an experimental feature. Since tsgo is still in the experimental stage, there may be some bugs and unresolved issues or limitations. So, make sure to fully test it in your project before enabling this option.
To enable this option, you need to:
Tip
@typescript/native-previewrequires Node.js 20.6.0 or higher.{ "typescript.experimental.useTsgo": true }Related Links
close: #1103
Checklist