Skip to content

[code-infra] Run TypeScript 7 alongside the TS6 JS API - #1828

Open
brijeshb42 wants to merge 16 commits into
masterfrom
ts7-side-by-side
Open

[code-infra] Run TypeScript 7 alongside the TS6 JS API#1828
brijeshb42 wants to merge 16 commits into
masterfrom
ts7-side-by-side

Conversation

@brijeshb42

@brijeshb42 brijeshb42 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Adopts the side-by-side setup from the TS 7.0 announcement: TS 7 ships only the native tsc, the JS API moved to @typescript/typescript6, and typescript-eslint hard-errors on TS 7 (typescript-eslint#10940) — which is why #1663 fails across the board.

Changes

  • typescriptnpm:@typescript/typescript6@^6.0.2 alias wherever the JS API is resolved (typescript-eslint, docs-infra type extraction). The alias bin is tsc6, so it doesn't shadow the root TS 7 tsc.
  • TS 7 installed as "@typescript/native": "npm:typescript@^7.0.2"; package typescript/build scripts run its tsc.
  • The Next.js apps install real typescript@7 and type-check through Next 16.3's TypeScript CLI.
  • code-infra resolves the declaration-emit CLI pair from the workspace .bin shims: tsgo/tsc on the legacy @typescript/native-preview nightly, tsc/tsc6 on this setup. All native-preview usage in this repo is removed.

Verification

  • This repo: pnpm typescript, eslint, release:build, test --run, prettier, docs and dashboard builds — all pass.
  • base-ui master with this PR's code-infra (via pkg.pr.new): pnpm build, release:build, typescript, jsdom unit suite (7874 tests), extract-error-codes — all pass through the legacy tsgo path. The eslint delta there (5.5k auto-fixable vitest/* errors) comes from [code-infra] Make vitest the default in createTestConfig, import globals instead #1798, not this PR.

Follow-ups

  • Close Bump typescript to v7.0.2 #1663; Renovate then tracks the compiler (7.x) and JS API (6.x) lines separately.
  • Roll out to base-ui-charts (still on the discontinued nightly), base-ui, base-ui-plus, base-ui-mosaic, then material-ui/mui-x once they consume the updated code-infra.

TypeScript 7 ships only the native tsc binary; the JS API that
typescript-eslint, docs-infra type extraction, and Next.js consume now
lives in @typescript/typescript6. typescript-eslint hard-errors on TS 7
and support is at least a major away (typescript-eslint#10940), so the
Renovate typescript major (#1663) cannot land as-is.

Follow the side-by-side setup documented in the TS 7.0 announcement:

- alias typescript to @typescript/typescript6 so every JS API consumer
  keeps resolving a 6.x API under the name it imports
- install TS 7 as "@typescript/native": "npm:typescript@^7.0.2" and
  point package typescript/build scripts at its tsc
- teach code-infra's findTsgo to probe @typescript/native/bin/tsc
  before the discontinued @typescript/native-preview tsgo, and declare
  the new optional peer, so downstream repos can migrate the same way

Per-package typescript6 dev deps are required: pnpm installs a
workspace importer's peers locally, and a real typescript@6 install
would shadow the workspace-root TS 7 tsc with its own .bin/tsc. The
alias's bin is named tsc6, which removes the shadowing.
@code-infra-dashboard

code-infra-dashboard Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-1828--mui-internal.netlify.app/
QR code for https://deploy-preview-1828--mui-internal.netlify.app/

Bundle size

Total Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%)
Files: 71 total (0 added, 0 removed, 0 changed)

Show details for 71 more bundles

@mui/internal-docs-infra/abstractCreateDemoparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateDemoClientparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateStreamparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateTypesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/ChunkProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/cliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeControllerContextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeExternalsContextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighterparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighter/errorsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighter/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CoordinatedLazyparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CoordinatedLazy/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createDemoDataparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createDemoData/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createSitemapparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createSitemap/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCodeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCodeWindowparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCoordinatedparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCopierparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCrossTabStateparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useDemoparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useDemoControllerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useErrorsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useLocalStorageStateparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/usePreferenceparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useScrollAnchorparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useSearchparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useSearch/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useStreamparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useStream/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useTypeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useTypesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useUrlHashStateparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/withDocsInfraparsed: 0B(0.00%) gzip: 0B(0.00%)
addLineGuttersparsed: 0B(0.00%) gzip: 0B(0.00%)
BuildEngineparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeHighlighterChunkparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeHighlighterClientparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeInitialSourceLoaderparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeSourceLoaderparsed: 0B(0.00%) gzip: 0B(0.00%)
compileCssWithPostcssparsed: 0B(0.00%) gzip: 0B(0.00%)
computeHastDeltasparsed: 0B(0.00%) gzip: 0B(0.00%)
createFrameparsed: 0B(0.00%) gzip: 0B(0.00%)
createParseSourceWorkerClientparsed: 0B(0.00%) gzip: 0B(0.00%)
EditingEngineparsed: 0B(0.00%) gzip: 0B(0.00%)
embedTransformsparsed: 0B(0.00%) gzip: 0B(0.00%)
enhanceCodeEmphasisparsed: 0B(0.00%) gzip: 0B(0.00%)
findExpandingRangesparsed: 0B(0.00%) gzip: 0B(0.00%)
getHastTextContentparsed: 0B(0.00%) gzip: 0B(0.00%)
grammarLoadersparsed: 0B(0.00%) gzip: 0B(0.00%)
grammarsparsed: 0B(0.00%) gzip: 0B(0.00%)
isFrameSpanparsed: 0B(0.00%) gzip: 0B(0.00%)
loadCodeFallbackparsed: 0B(0.00%) gzip: 0B(0.00%)
loadIsomorphicCodeVariantparsed: 0B(0.00%) gzip: 0B(0.00%)
parseSourceparsed: 0B(0.00%) gzip: 0B(0.00%)
rolldown-runtimeparsed: 0B(0.00%) gzip: 0B(0.00%)
source.cssparsed: 0B(0.00%) gzip: 0B(0.00%)
source.jsparsed: 0B(0.00%) gzip: 0B(0.00%)
source.jsonparsed: 0B(0.00%) gzip: 0B(0.00%)
source.mdxparsed: 0B(0.00%) gzip: 0B(0.00%)
source.shellparsed: 0B(0.00%) gzip: 0B(0.00%)
source.tsparsed: 0B(0.00%) gzip: 0B(0.00%)
source.tsxparsed: 0B(0.00%) gzip: 0B(0.00%)
source.yamlparsed: 0B(0.00%) gzip: 0B(0.00%)
text.html.basicparsed: 0B(0.00%) gzip: 0B(0.00%)
text.mdparsed: 0B(0.00%) gzip: 0B(0.00%)
TransformEngineparsed: 0B(0.00%) gzip: 0B(0.00%)
transpileSourceparsed: 0B(0.00%) gzip: 0B(0.00%)

Details of bundle changes

Performance

Total duration: 19.23 ms +2.56 ms(+15.3%) | Renders: 5 (+0) | Paint: 68.44 ms +8.26 ms(+13.7%)

Test Duration Renders
HeavyList mount 11.33 ms 🔺+2.65 ms(+30.6%) 1 (+0)
custom scalar + discrete metrics 0.00 ms 0 (+0)
sub-series via labels 0.00 ms 0 (+0)

4 tests within noise — details

Metric alarms

Test Metric Change
HeavyList mount bench:paint 🔺 +10.17 ms
custom scalar + discrete metrics fib_duration 🔺 +0.25 ms
sub-series via labels fib_phase#small 🔺 +0.04 ms
sub-series via labels fib_phase#large 🔺 +0.70 ms

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

@brijeshb42 brijeshb42 added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Aug 31, 2026
Next.js 16.3 enables experimental.useTypeScriptCli by default and
requires the typescript package to ship a bin/tsc. The TypeScript 7
side-by-side setup aliases typescript to @typescript/typescript6,
whose bin is tsc6, so next build aborts reporting typescript as
missing. Default useTypeScriptCli to false on Next.js >= 16.3;
docs-infra requires the TS6 JS API for type extraction anyway.
Consumers can still opt back in through their own experimental
config.
The nightly @typescript/native-preview package is discontinued in
favor of stable TypeScript 7. Remove its optional peer dependency and
the .bin/tsgo fallback probe; the native compiler is now found only
through the documented "@typescript/native": "npm:typescript@^7.0.0"
alias.
@brijeshb42 brijeshb42 added internal Behind-the-scenes enhancement. Formerly called “core”. typescript labels Aug 31, 2026
Spawning @typescript/native/bin/tsc directly fails on Windows: the
shebang script is not executable by cmd. Probe the pnpm .bin shims
instead, matching how the old .bin/tsgo probe worked cross-platform.

In the side-by-side setup the native compiler owns the workspace-root
tsc bin and the TS6 JS CLI is exposed as tsc6, so the native check now
looks for .bin/tsc and the JS path prefers .bin/tsc6 (package first,
then workspace root) before falling back to plain tsc from PATH for
repos not on the alias.
Resolve the native/JS CLI pair in one place: a workspace-root tsgo
shim (legacy @typescript/native-preview install, where typescript
still owns tsc) selects the tsgo/tsc pair; otherwise the TypeScript 7
side-by-side pair tsc/tsc6 applies. Consumer repos still on the
nightly keep building with the new code-infra until they migrate.
@brijeshb42 brijeshb42 changed the title [core] Run TypeScript 7 alongside the TS6 JS API [code-infra] Run TypeScript 7 alongside the TS6 JS API Aug 31, 2026
@brijeshb42 brijeshb42 removed the internal Behind-the-scenes enhancement. Formerly called “core”. label Aug 31, 2026
The typescript6 alias and @typescript/native now live only in the
root package.json; per-package copies are gone. This requires
autoInstallPeers: false — pnpm otherwise fetches a real typescript
for per-package peers (typescript-eslint requires one), whose
.bin/tsc shadows the root native tsc, and 404s on @typescript/native,
an alias rather than a registry package. Unmet typescript peers now
resolve through the root at runtime.

Turning off peer auto-install exposed deps test-utils imported but
never declared (@emotion/*, chai, react, react-dom); declare them as
devDependencies.
The dashboard's minimal next.config gets no help from
withDeploymentConfig, so the Next.js >= 16.3 default CLI checker
looks for a tsc bin the typescript6 alias does not ship and aborts
the build reporting typescript as missing. Opt into the TS6 JS API
like the docs site. No local typescript install is needed; the root
alias resolves by walking up.
Next.js 16.3's default CLI checker supports TypeScript 7, so instead
of opting the apps into the TS6 JS API, install real typescript@7 in
docs and code-infra-dashboard. Next.js finds its tsc bin locally and
type-checks natively. docs-infra still consumes the TS6 JS API
through its own devDependency via the workspace link.
@brijeshb42

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review depth: medium (one main-agent pass over Bugs / Tests / Simplifications / Docs, verified locally against pr-head). Nothing merge-blocking.

PR review

The dependency rewiring looks coherent — the tsc6 alias keeps the JS API available to typescript-eslint and docs-infra's type extraction while the root tsc becomes TS 7 native, and every tsgo script maps cleanly onto it. The one substantive issue is in findTscPair: native-compiler detection changed from "is there a .bin/tsgo" (a name only the native package provides) to "is there a .bin/tsc" (a name every typescript install provides), so the --tsgo guard can no longer fire and the "Using tsgo" log can now describe a JS-tsc run. None of that new resolution logic is covered by a test, and in this repo the pair.js branch never executes at all.

Bugs (2)

1. 🟠 --tsgo now accepts a plain JS tsc as the "native" compiler, so its guard is unreachable and the log misreports

Location: packages/code-infra/src/utils/typescript.mjs:50

const native = await findBin(workspaceDir, 'tsc');
const js = (await findBin(cwd, 'tsc6')) ?? (await findBin(workspaceDir, 'tsc6')) ?? 'tsc';
return { native, js };

The removed findTsgo probed for node_modules/.bin/tsgo — a shim only @typescript/native-preview installs, so pair.native was a reliable "the native compiler exists" signal. tsc is not: it is the bin of every typescript release, TS 5 and TS 6 included. In any workspace whose root has a conventional typescript dependency, findBin(workspaceDir, 'tsc') succeeds and --tsgo / MUI_USE_TSGO is treated as satisfied.

Two consequences follow from this one line:

  • The new error message at typescript.mjs:71 is effectively dead code — it only fires in a workspace with no root typescript at all.
  • console.log('Using tsgo for declaration emit') (typescript.mjs:76) prints unconditionally on the native path, so it now claims tsgo while running whatever .bin/tsc happens to be.

Failure scenario: material-ui or mui-x picks up this code-infra while still on typescript@5.9 at the workspace root, with code-infra build --tsgo in a package script. Previously the build stopped with "install the native package …". Now it prints Using tsgo for declaration emit, emits declarations with TS 5.9's JS compiler at JS-compiler speed, and nobody notices the flag stopped meaning anything. Someone then files "why is tsgo so slow in our repo".

Fix: confirm the resolved tsc really is the native compiler before returning it as native — e.g. resolve the package backing the shim and check its name/major (typescript@>=7 or @typescript/native*) — and keep the throw meaningful. Separately, log the resolved path in both branches (Using ${tscPath} for declaration emit) instead of a hard-coded "tsgo"; with both compilers now named tsc, the resolved path is the only thing that actually tells a maintainer which one ran.

2. 🟡 native and js use different lookup scopes, so workspace-root tsc6 outranks a package-local compiler

Location: packages/code-infra/src/utils/typescript.mjs:50

const native = await findBin(workspaceDir, 'tsc');                    // workspace root only
const js = (await findBin(cwd, 'tsc6')) ?? (await findBin(workspaceDir, 'tsc6')) ?? 'tsc';  // cwd, then root

js walks cwd → workspace root; native checks only the workspace root. That asymmetry produces two behaviour changes:

  • A package that installs TS 7 in its own node_modules while the workspace root does not gets native === null, so --tsgo throws even though a usable .bin/tsc sits right next to its tsconfig.build.json.
  • On the js path, the previous code ran a bare $$`tsc …`, which execa resolves through PATH — and pnpm run puts the package's own node_modules/.bin ahead of the root's. Now, for a package that pins its own typescript (bin tsc, so the cwd tsc6 probe misses), the absolute workspace-root tsc6 wins instead.

Failure scenario: in an adopting monorepo, a package pins typescript@6.1 locally while the root alias sits at @typescript/typescript6@6.0.2. Declaration emit for that package silently switches from the pinned 6.1 to the root 6.0.2, so the published .d.ts no longer matches the version the package type-checks against.

Fix: use the same cwd → workspaceDir walk for both halves of the pair (findBin(cwd, name) ?? findBin(workspaceDir, name)), and probe package-local tsc for native too. The two findBin chains are independent, so they can also run under a single Promise.all (repo rule 7.8).

Tests (1)

1. 🟠 The new compiler-resolution logic has no test, and this repo never exercises half of it

Location: packages/code-infra/src/utils/typescript.mjs:39

async function findTscPair(cwd) {

findTscPair encodes a five-way precedence chain — root tsgo, root tsc, cwd tsc6, root tsc6, bare tsc — and it is the highest-risk change in the PR, since picking the wrong entry silently changes which compiler produces published declarations. typescript.test.mjs covers only copyDeclarations and moveAndTransformDeclarations; nothing touches this function.

It is also unverifiable from this repo's CI: every code-infra build here passes --tsgo (packages/benchmark, packages/docs-infra, packages/test-utils), so pair.js is never used, and pair.native always resolves to the same root shim. The js branch only runs in downstream consumers.

Failure scenario: the precedence order gets reshuffled during the base-ui / material-ui rollout (or the tsgo early-return is dropped once the nightly is gone) and the suite stays green, because no test asserts which shim wins for a given .bin layout.

Fix: export findTscPair and add a describe('findTscPair') block driven by temp directories containing empty executable files at node_modules/.bin/{tsgo,tsc,tsc6} — this is a pure filesystem lookup, so no faking is needed beyond real fixture dirs, satisfying the repo's no-mocks rule. Cover: tsgo present wins; tsc-only root; cwd tsc6 beats root tsc6; nothing found falls back to bare tsc; no workspace dir.

Simplifications (1)

1. 🟡 The @typescript/native peer dependency names something nothing checks and consumers cannot install by that name

Location: packages/code-infra/package.json:151

"peerDependencies": {
  "@typescript/native": "^7.0.0",
  ...
}

@typescript/native is this repo's private npm alias (npm:typescript@^7.0.2), not an independently published package. So the only way for a consumer to satisfy this peer is to replicate the exact alias; anyone who installs TS 7 the documented way (typescript@7) does not satisfy it, and because the peer is optional pnpm stays silent about it. Meanwhile findTscPair never looks for this package name — it looks for a .bin/tsc shim, which typescript@7 provides just as well. The peer therefore carries no enforcement and no useful signal, while the error at typescript.mjs:71 sends readers to add an alias they don't need.

Failure scenario: base-ui adopts TS 7 as plain typescript@7, gets no peer warning and a working native build, then hits --tsgo failing in one package and follows the error's advice to add a @typescript/native alias — pure cargo cult, since the .bin/tsc it already had was the actual requirement.

Fix: drop the @typescript/native peer entry (and its peerDependenciesMeta block) and state the real requirement in the error text instead: a native tsc (TypeScript ≥ 7) resolvable from the workspace root's node_modules/.bin, installed either as typescript@^7 or under an alias. Keeping the existing typescript peer as the JS-API range is correct and needs no change.

Docs (2)

1. 🟡 findTscPair's JSDoc describes detection the code doesn't perform

Location: packages/code-infra/src/utils/typescript.mjs:32

 * Resolves the native/JS TypeScript CLI pair from the workspace's `.bin` shims:
 * tsgo/tsc with `@typescript/native-preview`, tsc/tsc6 with the TS7
 * side-by-side aliases, plain `tsc` from PATH otherwise.

Two claims here are wrong. The code never detects "the TS7 side-by-side aliases" — it returns the root .bin/tsc as native whatever produced it (see Bug 1). And "plain tsc from PATH otherwise" applies only to js; on that branch native is whatever .bin/tsc exists or null, never a PATH fallback. A future maintainer reading this comment will believe the alias setup is validated and skip the check Bug 1 asks for.

Failure scenario: the next person to touch this function trusts the comment, assumes pair.native implies a TS 7 native compiler, and builds more behaviour on that assumption.

Fix: describe the actual precedence instead — root .bin/tsgo if present (legacy native-preview), else root .bin/tsc as native and tsc6 (cwd, then root) as js, falling back to a bare tsc for js only.

2. 🟡 --tsgo help text and terminology are stale now that no tsgo binary exists

Location: packages/code-infra/src/cli/cmdBuild.mjs:230

.option('tsgo', {
  type: 'boolean',
  default: process.env.MUI_USE_TSGO,
  description:
    'Uses tsgo cli instead of tsc for type generation. Can also be set via env var "MUI_USE_TSGO"',
})

"Uses tsgo cli instead of tsc" no longer describes anything on this setup: both compilers are invoked as tsc, and what the flag really selects is the native compiler over the TS 6 JS API. The PR removes all native-preview usage from the repo, so tsgo is now a name for a discontinued nightly that appears nowhere in the dependency tree — yet it remains the public flag name, the env var name, the JSDoc wording at typescript.mjs:60 and :214, and the log string at typescript.mjs:76.

Failure scenario: a base-ui contributor reads --tsgo, greps their repo for tsgo, finds nothing, and can't tell whether the flag is a no-op.

Fix: at minimum reword the description to "Use the native TypeScript compiler (TS 7 tsc) instead of the JS API compiler for type generation". Better, since this PR is already the terminology break: add --native / MUI_USE_NATIVE_TSC as the real name and mark --tsgo deprecated — cmdBuild.mjs already has the pattern for that on --flat.

Verdict

Approve after nits — no blocking issues; the --tsgo detection weakening (Bug 1) plus a test for findTscPair are worth landing before the base-ui / material-ui rollout, since that is exactly where the unexercised pair.js branch and the JS-tsc-as-native fallback will first bite.


🤖 Review generated with Claude Code · Opus 5 (High) · medium review depth · 28 turns · 6m59s · $2.21 · run

Review follow-up: the tsc6 probe walked the package directory first
while the native probe checked only the workspace root. Both halves
of the pair now resolve from the workspace root's node_modules/.bin,
probed in parallel.
- Drop the MUI_USE_TSGO env var; --tsgo stays as the only switch.
- Log the resolved compiler path on both emit paths, labelled
  ts-native on the native one, so builds show which tsc actually ran.
- Drop the @typescript/native optional peer: nothing checks that
  name and consumers installing plain typescript@7 could never
  satisfy it. The error message now states the real requirement.
- Reword the stale tsgo help text.
Type extraction requires the TypeScript 6 JS API, but the required
`typescript` peer resolved it from the consuming docs app — a docs
app on typescript@7 (for the Next.js CLI type checker) then feeds
docs-infra an API-less compiler and the build dies with
"ts.readConfigFile is not a function". Ship the typescript6 alias as
a regular dependency instead, the same pattern
typescript-api-extractor already uses, and drop the peer. Consumer
apps are then free to run any typescript version.
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). typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants