Skip to content

Conversation

@chenjiahan
Copy link
Member

@chenjiahan chenjiahan commented Jun 11, 2025

Summary

Update TypeScript guide to include the verbatimModuleSyntax option. It is recommended and will supersede isolatedModules.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings June 11, 2025 08:20
@netlify
Copy link

netlify bot commented Jun 11, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 19863ae
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68493c69b658220008c02b78
😎 Deploy Preview https://deploy-preview-5398--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 78 (🔴 down 2 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a 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 updates the TypeScript guide documentation to introduce the new verbatimModuleSyntax option, which is recommended for TypeScript ≥5.0.0 and supersedes the former isolatedModules option.

  • Updates links and descriptions to reference verbatimModuleSyntax
  • Adds a code snippet example for using verbatimModuleSyntax in tsconfig.json
  • Adjusts both Chinese and English guides to reflect this change

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
website/docs/zh/guide/basic/typescript.mdx Updated wording to recommend verbatimModuleSyntax and add code examples
website/docs/en/guide/basic/typescript.mdx Updated wording to recommend verbatimModuleSyntax and add code examples
Comments suppressed due to low confidence (2)

website/docs/zh/guide/basic/typescript.mdx:13

  • Clarify that verbatimModuleSyntax is available only in TypeScript 5.0.0 and later. Consider adding a concise note that for earlier versions, isolatedModules must be used instead.
+- 如果 `typescript` >= 5.0.0,使用 `verbatimModuleSyntax` 选项,它会默认启用 `isolatedModules` 选项:

website/docs/en/guide/basic/typescript.mdx:13

  • Consider adding a brief explanation that verbatimModuleSyntax is only supported with TypeScript 5.0.0 or later, and that users with earlier versions should continue using isolatedModules.
+- If `typescript` >= 5.0.0, use the `verbatimModuleSyntax` option, it will enable `isolatedModules` option by default:

@chenjiahan chenjiahan merged commit 012982c into main Jun 11, 2025
13 checks passed
@chenjiahan chenjiahan deleted the verbatimModuleSyntax_doc_0611 branch June 11, 2025 08:23
@chenjiahan chenjiahan mentioned this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant