Skip to content

[code-infra] Convert @mui/private-theming to TypeScript#48565

Draft
Janpot wants to merge 1 commit into
mui:masterfrom
Janpot:code-infra/private-theming-ts
Draft

[code-infra] Convert @mui/private-theming to TypeScript#48565
Janpot wants to merge 1 commit into
mui:masterfrom
Janpot:code-infra/private-theming-ts

Conversation

@Janpot
Copy link
Copy Markdown
Member

@Janpot Janpot commented May 22, 2026

Converts @mui/private-theming from hand-written .js + .d.ts to true TypeScript (single .ts/.tsx source, declarations emitted by tsc), removing the --skipTsc build — like @mui/utils and @mui/styled-engine (#48544).

The exported type surface is unchanged, verified with a bidirectional type-equivalence probe across the root and every subpath entry (ThemeProvider, useTheme, defaultTheme). Emitted JS is byte-identical modulo comments; the .d.ts differences are limited to type-preserving form changes (import type, export type *, declare function).

unstable_nested stays a runtime-only export, absent from the public types as before, via @internal + stripInternal.

@mui/system gains a tsconfig.build.json project reference to the now-true-TS package.

Published artifact diff

Diff of the published package before/after this PR: @mui/private-theming 3fa001ff305df7

@Janpot Janpot added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). labels May 22, 2026
@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 22, 2026

Deploy preview

https://deploy-preview-48565--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

Convert the package from hand-written `.js` + `.d.ts` to true TypeScript
(single `.ts`/`.tsx` source, declarations emitted by `tsc`), removing the
`--skipTsc` build. The exported type surface is unchanged, verified with a
bidirectional type-equivalence probe; `unstable_nested` stays a runtime-only
export via `@internal` + `stripInternal`.
@Janpot Janpot force-pushed the code-infra/private-theming-ts branch from 56299ee to f305df7 Compare May 22, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant