[code-infra] Make @mui/internal-docs-utils compatible with TypeScript 6#48594
Draft
Janpot wants to merge 1 commit into
Draft
[code-infra] Make @mui/internal-docs-utils compatible with TypeScript 6#48594Janpot wants to merge 1 commit into
Janpot wants to merge 1 commit into
Conversation
Deploy previewhttps://deploy-preview-48594--material-ui.netlify.app/ Bundle size
Check out the code infra dashboard for more information about this PR. |
LukasTy
approved these changes
May 29, 2026
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.
Summary
Makes
@mui/internal-docs-utilscompatible with TypeScript 6 ahead of the repo-wide TS 6 upgrade.The package re-exports the TypeScript compiler API types (
ts.Symbol,ts.Type,ts.Program,ts.Node) in its public API and operates on AST nodes its consumers create. So it must share a singletypescriptinstance with whoever consumes it — a bundleddependenciescopy invites duplicate-typescript type incompatibilities andSyntaxKindenum mismatches.typescriptfromdependenciestopeerDependencieswith range^5.9.3 || ^6.0.0(admits TS 6 while keeping 5.9 working).typescriptdevDependency(5.9.3) so the package still typechecks/builds standalone.The previous
^5.9.3direct dependency excluded6.x, which would have caused pnpm to resolve a separatetypescript@5.9.3for this package — silently keeping its typecheck on 5.9 and creating a version mismatch for consumers on TS 6.The source itself required no changes: it already typechecks and emits declarations cleanly against
typescript@6.0.0-dev(verified locally).Downstream note
This is a published package also consumed by
mui-x. MovingtypescripttopeerDependenciesis a (minor) change to the published dependency contract, but both in-repo consumers (api-docs-builder,scripts) andmui-xalready depend ontypescript, so the peer requirement stays satisfied.