Skip to content

(TypeScript 7 Support) Add experimental TypeScript CLI backend - #95639

Merged
lukesandberg merged 3 commits into
canaryfrom
codex/experimental-typescript-cli
Jul 10, 2026
Merged

(TypeScript 7 Support) Add experimental TypeScript CLI backend#95639
lukesandberg merged 3 commits into
canaryfrom
codex/experimental-typescript-cli

Conversation

@timneutkens

@timneutkens timneutkens commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add experimental.useTypeScriptCli so projects can explicitly run their local tsc during next build, including TypeScript 7 while the legacy JavaScript API is unavailable
  • preserve the TypeScript API backend as the default, with TypeScript 6-compatible dependency installation and actionable TypeScript 7 migration guidance
  • load effective compiler metadata through tsc --showConfig, preserve inherited path origins, stream native diagnostics, redirect incremental state, and forward worker termination to the compiler process tree
  • document the experimental behavior and cover TypeScript 6/7, both bundlers, raw diagnostics, full-project checking, dependency selection, and cleanup

Demo

pnpm build

> cna@0.1.0 build /Users/timneutkens/projects/sandbox/cna
> next build

▲ Next.js 16.3.0-canary.81 (Turbopack)
✓ Running next.config.ts took 23ms
- Cache Components enabled
- Experiments (use with caution):
  ✓ useTypeScriptCli

  Creating an optimized production build ...
✓ Compiled successfully in 3.9s
  Running TypeScript ...
app/page.tsx:8:3 - error TS2322: Type 'string' is not assignable to type 'number'.

8   return count++ + "abc";
    ~~~~~~


Found 1 error in app/page.tsx:8

Failed to type check.

Next.js build worker exited with code: 1 and signal: null
 ELIFECYCLE  Command failed with exit code 1.

Verification

  • pnpm test-start-turbo test/production/app-dir/typescript-cli/typescript-cli.test.ts
  • pnpm test-start-webpack test/production/app-dir/typescript-cli/typescript-cli.test.ts
  • pnpm test-start-turbo test/production/ci-missing-typescript-deps/index.test.ts
  • pnpm test-dev-turbo test/development/typescript-native-preview/index.test.ts
  • pnpm test-start-turbo test/production/typescript-basic/index.test.ts

@timneutkens
timneutkens force-pushed the codex/experimental-typescript-cli branch from 24a7cff to 65fd2b7 Compare July 9, 2026 18:02
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Stats from current PR

🔴 3 regressions

Metric Canary PR Change Trend
node_modules Size 515 MB 515 MB 🔴 +182 kB (+0%) ▁▁▁▁▁
Webpack Build Time (cached) 24.946s 25.496s 🔴 +550ms (+2%) ▄▆▃▁▁
Webpack Cold (First Request) 3.285s 3.410s 🔴 +125ms (+4%) ▇▅▄▂▁
📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 813ms 813ms █▁▁██
Cold (Ready in log) 778ms 783ms ▅▁▃▆▆
Cold (First Request) 1.297s 1.333s ▃▁▁▄▄
Warm (Listen) 814ms 813ms █▁███
Warm (Ready in log) 783ms 786ms ▆▁▄▆▆
Warm (First Request) 1.314s 1.319s ▅▃▃▄▂
📦 Dev Server (Webpack) (Legacy)

📦 Dev Server (Webpack)

Metric Canary PR Change Trend
Cold (Listen) 813ms 813ms ███▁▁
Cold (Ready in log) 782ms 787ms ▅▆▄▁▁
Cold (First Request) 3.285s 3.410s 🔴 +125ms (+4%) ▇▅▄▂▁
Warm (Listen) 812ms 812ms ███▁▁
Warm (Ready in log) 784ms 787ms █▅▄▂▂
Warm (First Request) 3.359s 3.359s █▃▃▂▁

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 5.123s 5.194s ▃▁▁▄▂
Cached Build 5.447s 5.533s ▃▁▁▄▆
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
Fresh Build 24.950s 25.339s ▃▄▃▁▂
Cached Build 24.946s 25.496s 🔴 +550ms (+2%) ▄▆▃▁▁
node_modules Size 515 MB 515 MB 🔴 +182 kB (+0%) ▁▁▁▁▁
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles
Canary PR Change
01mcsxsyr_he2.js gzip 71.1 kB N/A -
03gmyxr7dukvs.js gzip 10.3 kB N/A -
040t1q17lo593.js gzip 8.77 kB N/A -
0acse__myyi12.js gzip 169 B N/A -
0bb0vtp8dwsez.js gzip 450 B N/A -
0cz1d0mv5g_q7.js gzip 39.4 kB 39.4 kB
0l0sr6gau5xjn.js gzip 3.53 kB N/A -
0nxqz3q165m2l.js gzip 220 B N/A -
0qr-1tnb7_hg5.js gzip 5.72 kB N/A -
0uilzvklme4ea.js gzip 8.76 kB N/A -
0z0y83mfx-l-h.js gzip 10 kB N/A -
15ok8ydf274z0.js gzip 10.6 kB N/A -
16cqqcigykfea.js gzip 13.6 kB N/A -
16p6k4rvlk8hs.js gzip 156 B N/A -
17h18zxt1915l.js gzip 1.46 kB N/A -
1elt1qium-r2m.css gzip 115 B 115 B
1fq1h7dxad4cv.js gzip 9.44 kB N/A -
1fym-adbk_69_.js gzip 13.1 kB N/A -
1g80-jfls9qyr.js gzip 13.2 kB N/A -
1gav7nfh4y8ln.js gzip 8.76 kB N/A -
1pirlzcqpboke.js gzip 157 B N/A -
22sajk3amu-ua.js gzip 45 kB N/A -
2b47thog_o22q.js gzip 158 B N/A -
2nh_8jlh884jn.js gzip 161 B N/A -
2oyxoidxog322.js gzip 65.5 kB N/A -
2rypqffktcxqh.js gzip 8.69 kB N/A -
2uqsizxtehgqf.js gzip 8.79 kB N/A -
2vzktdqwbijqc.js gzip 8.74 kB N/A -
3afhrvsbhvr34.js gzip 156 B N/A -
3ak6zl4zjnt8w.js gzip 155 B N/A -
3c244akvx_-be.js gzip 8.74 kB N/A -
3dmlemitx3ef3.js gzip 2.29 kB N/A -
3ffc-vg2dfz3_.js gzip 155 B N/A -
3od-h0_3-qwrn.js gzip 161 B N/A -
3y193x4n8cq9d.js gzip 7.4 kB N/A -
3y3blyb4ymhm2.js gzip 153 B N/A -
3ykopt545p33e.js gzip 157 B N/A -
40ihydltprauy.js gzip 156 B N/A -
4237vdj6eyslt.js gzip 8.7 kB N/A -
43bfotaq-14ip.js gzip 154 B N/A -
turbopack-07..s8o7.js gzip 3.85 kB N/A -
turbopack-08..e1gp.js gzip 3.85 kB N/A -
turbopack-08..c-or.js gzip 3.84 kB N/A -
turbopack-0o..gxwn.js gzip 3.85 kB N/A -
turbopack-0q..-9tl.js gzip 3.83 kB N/A -
turbopack-0y..emj9.js gzip 3.84 kB N/A -
turbopack-1_..v-s0.js gzip 3.85 kB N/A -
turbopack-1d..5zex.js gzip 3.84 kB N/A -
turbopack-1o..3j31.js gzip 3.85 kB N/A -
turbopack-1x..-mzg.js gzip 3.85 kB N/A -
turbopack-2r..sgjm.js gzip 3.86 kB N/A -
turbopack-3b..fo18.js gzip 3.85 kB N/A -
turbopack-3k..nny0.js gzip 3.85 kB N/A -
turbopack-40..u_28.js gzip 3.85 kB N/A -
00tc16j5-eos9.js gzip N/A 1.46 kB -
05tax4x1rfda4.js gzip N/A 7.4 kB -
0ej25wuqhwna-.js gzip N/A 155 B -
0gaw1gmpwuwkn.js gzip N/A 8.8 kB -
0l71aswcqfx-_.js gzip N/A 152 B -
12zyjjmq4oad1.js gzip N/A 5.72 kB -
19oscshzjelcp.js gzip N/A 155 B -
1e60oe94c-qdx.js gzip N/A 167 B -
1k9cc4-gpa2cx.js gzip N/A 13.1 kB -
1n59uogejo81s.js gzip N/A 10.3 kB -
1npei3hlexdv3.js gzip N/A 9.99 kB -
1ssuiwj_rnpc5.js gzip N/A 8.77 kB -
1wli4rczh90gc.js gzip N/A 154 B -
2-phc9obd3nyd.js gzip N/A 8.77 kB -
24utq57r3l1cw.js gzip N/A 8.7 kB -
2atpv2oo9yu1i.js gzip N/A 155 B -
2fhjq6ek3srmr.js gzip N/A 8.69 kB -
2fvnps--3eqav.js gzip N/A 154 B -
2g0t7upz_v-hf.js gzip N/A 10.6 kB -
2gipd1kxr2gbo.js gzip N/A 155 B -
2h0sgjzpt5j0a.js gzip N/A 153 B -
2ia9qqy99aie9.js gzip N/A 13.6 kB -
2n337-mum3n5w.js gzip N/A 156 B -
2oza28kdqvoay.js gzip N/A 8.74 kB -
2ybks07m-a5ag.js gzip N/A 155 B -
2zh8-mmhujy8o.js gzip N/A 2.29 kB -
30h_m0irj-q6p.js gzip N/A 221 B -
37ejbfx1u9lpo.js gzip N/A 8.75 kB -
38c63ct4i1cy7.js gzip N/A 449 B -
3hd1us4ordyc9.js gzip N/A 13.2 kB -
3jimpal3lvz5e.js gzip N/A 9.44 kB -
3ns42zoevxrsp.js gzip N/A 45 kB -
3q1x790o0i9--.js gzip N/A 71.1 kB -
3qukz4yagu4v3.js gzip N/A 65.5 kB -
3su6a4l8jbfth.js gzip N/A 3.53 kB -
3wb4pe4z4-aim.js gzip N/A 8.77 kB -
3xtlj242vjngb.js gzip N/A 160 B -
3yqtt-b6_v5qn.js gzip N/A 160 B -
turbopack-03..c_u8.js gzip N/A 3.85 kB -
turbopack-05..li1y.js gzip N/A 3.85 kB -
turbopack-0o..-hpx.js gzip N/A 3.85 kB -
turbopack-12..z9p8.js gzip N/A 3.85 kB -
turbopack-1f..g5yn.js gzip N/A 3.85 kB -
turbopack-1w..-lc2.js gzip N/A 3.83 kB -
turbopack-2k..0cv1.js gzip N/A 3.85 kB -
turbopack-2x..dq3x.js gzip N/A 3.85 kB -
turbopack-37..d_l6.js gzip N/A 3.84 kB -
turbopack-3b..1h16.js gzip N/A 3.85 kB -
turbopack-3h..erel.js gzip N/A 3.85 kB -
turbopack-3h..22fn.js gzip N/A 3.84 kB -
turbopack-3j..city.js gzip N/A 3.85 kB -
turbopack-3k..bmba.js gzip N/A 3.86 kB -
Total 448 kB 448 kB ⚠️ +25 B

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 731 B 721 B 🟢 10 B (-1%)
Total 731 B 721 B ✅ -10 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 432 B 433 B
Total 432 B 433 B ⚠️ +1 B

📦 Webpack

Client

Main Bundles
Canary PR Change
2486.HASH.js gzip 169 B N/A -
3146-HASH.js gzip 64 kB N/A -
39fcf99b-HASH.js gzip 62.9 kB N/A -
8443-HASH.js gzip 4.68 kB N/A -
9431-HASH.js gzip 5.62 kB N/A -
framework-HASH.js gzip 59.8 kB 59.8 kB
main-app-HASH.js gzip 255 B 253 B
main-HASH.js gzip 39.6 kB 40.1 kB 🔴 +455 B (+1%)
webpack-HASH.js gzip 1.68 kB 1.68 kB
6105-HASH.js gzip N/A 5.63 kB -
764.HASH.js gzip N/A 169 B -
8898-HASH.js gzip N/A 63.4 kB -
9597-HASH.js gzip N/A 4.65 kB -
e1ccab69-HASH.js gzip N/A 62.9 kB -
Total 239 kB 238 kB ✅ -141 B
Polyfills
Canary PR Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Total 39.4 kB 39.4 kB
Pages
Canary PR Change
_app-HASH.js gzip 194 B 194 B
_error-HASH.js gzip 183 B 182 B
css-HASH.js gzip 335 B 335 B
dynamic-HASH.js gzip 1.8 kB 1.8 kB
edge-ssr-HASH.js gzip 255 B 254 B
head-HASH.js gzip 351 B 349 B
hooks-HASH.js gzip 384 B 384 B
image-HASH.js gzip 580 B 580 B
index-HASH.js gzip 259 B 259 B
link-HASH.js gzip 2.49 kB 2.49 kB
routerDirect..HASH.js gzip 319 B 319 B
script-HASH.js gzip 386 B 386 B
withRouter-HASH.js gzip 315 B 313 B
1afbb74e6ecf..834.css gzip 106 B 106 B
Total 7.96 kB 7.95 kB ✅ -7 B

Server

Edge SSR
Canary PR Change
edge-ssr.js gzip 127 kB 127 kB
page.js gzip 279 kB 281 kB
Total 406 kB 408 kB ⚠️ +1.75 kB
Middleware
Canary PR Change
middleware-b..fest.js gzip 619 B 615 B
middleware-r..fest.js gzip 156 B 155 B
middleware.js gzip 45.2 kB 44.9 kB
edge-runtime..pack.js gzip 842 B 842 B
Total 46.8 kB 46.5 kB ✅ -339 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 719 B 720 B
Total 719 B 720 B ⚠️ +1 B
Build Cache
Canary PR Change
0.pack gzip 4.78 MB 4.77 MB 🟢 7.9 kB (0%)
index.pack gzip 118 kB 119 kB
index.pack.old gzip 117 kB 117 kB
Total 5.01 MB 5 MB ✅ -6.5 kB

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 362 kB 362 kB
app-page-exp..prod.js gzip 200 kB 200 kB
app-page-tur...dev.js gzip 361 kB 361 kB
app-page-tur..prod.js gzip 200 kB 200 kB
app-page-tur...dev.js gzip 358 kB 358 kB
app-page-tur..prod.js gzip 198 kB 198 kB
app-page.run...dev.js gzip 358 kB 358 kB
app-page.run..prod.js gzip 198 kB 198 kB
app-route-ex...dev.js gzip 79.1 kB 79.1 kB
app-route-ex..prod.js gzip 53.6 kB 53.6 kB
app-route-tu...dev.js gzip 79.1 kB 79.1 kB
app-route-tu..prod.js gzip 53.7 kB 53.7 kB
app-route-tu...dev.js gzip 78.7 kB 78.7 kB
app-route-tu..prod.js gzip 53.4 kB 53.4 kB
app-route.ru...dev.js gzip 78.7 kB 78.7 kB
app-route.ru..prod.js gzip 53.4 kB 53.4 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 45.2 kB 45.2 kB
pages-api-tu..prod.js gzip 34 kB 34 kB
pages-api.ru...dev.js gzip 45.2 kB 45.2 kB
pages-api.ru..prod.js gzip 33.9 kB 33.9 kB
pages-turbo....dev.js gzip 54.7 kB 54.7 kB
pages-turbo...prod.js gzip 39.6 kB 39.6 kB
pages.runtim...dev.js gzip 54.7 kB 54.7 kB
pages.runtim..prod.js gzip 39.6 kB 39.6 kB
server.runti..prod.js gzip 65.1 kB 65.1 kB
use-cache-pr...dev.js gzip 71.3 kB 71.3 kB
use-cache-pr...dev.js gzip 71.4 kB 71.4 kB
use-cache-pr...dev.js gzip 69.7 kB 69.7 kB
use-cache-pr...dev.js gzip 69.7 kB 69.7 kB
Total 3.46 MB 3.46 MB ⚠️ +11 B
📝 Changed Files (3 files)

Files with changes:

  • server.runtime.prod.js
  • pages-api-tu..time.prod.js
  • pages-turbo...time.prod.js
View diffs
server.runtime.prod.js

Diff too large to display

pages-api-tu..time.prod.js

Diff too large to display

pages-turbo...time.prod.js

Diff too large to display

📎 Tarball URL
https://vercel-packages.vercel.app/next/commits/080d18772338141034c7c05cd17773b7826265e5/next

Commit: 080d187

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 080d187

@timneutkens
timneutkens force-pushed the codex/experimental-typescript-cli branch from 65fd2b7 to b7405dc Compare July 9, 2026 18:11
@timneutkens
timneutkens force-pushed the codex/experimental-typescript-cli branch from b7405dc to 8a69222 Compare July 9, 2026 18:31
@timneutkens
timneutkens marked this pull request as ready for review July 9, 2026 21:44
@timneutkens timneutkens changed the title Add experimental TypeScript CLI backend (TypeScript 7 Support) Add experimental TypeScript CLI backend Jul 9, 2026

@andrewimm andrewimm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the actual lib/typescript bits. I ran it through some scenarios that weren't explicitly tested, especially on the config handling, it seems like all of the edge cases work. Signal handling looks thorough, and I'm pretty sure the child process handling will work on Windows too (no signals, but the console should kill it with events).

Comment thread packages/next/src/build/type-check.ts
Comment thread packages/next/src/lib/typescript/loadTsConfig.ts
Comment thread packages/next/src/lib/typescript/loadTsConfig.ts
Comment on lines +160 to +164
for (const signal of terminationSignals) {
const handler = createSignalHandler(signal)
signalHandlers.set(signal, handler)
process.once(signal, handler)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this is why we run in a child worker process, when the parent calls end it will send sigterm and we will propagate

wouldn't it be better to just invoke typecript CLI directly instead of going through the jest worker? i guess the problem is doing the config resolution in the parent nodejs process? but this does simplify the invocation and avoid an extra node process spawn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#95692 improves this

@lukesandberg
lukesandberg merged commit a249dcb into canary Jul 10, 2026
129 checks passed
@lukesandberg
lukesandberg deleted the codex/experimental-typescript-cli branch July 10, 2026 01:43
dvakatsiienko added a commit to dvakatsiienko/bytes that referenced this pull request Jul 10, 2026
typescript@7.0.2 breaks all four Next.js apps in Vercel CI. Next
16.2.10's verify-typescript-setup.js probes for typescript/lib/typescript.js
to confirm TypeScript is installed — that file (and any deep import path)
no longer exists in TS7's package, which ships only an exports-restricted
shim to the native Go binary. Next then tries to auto-repair by running
pnpm add -D typescript mid-build, which fails hard in Vercel's CI
environment (confirmed via build logs: cv, financial, figmentation,
x-com-chat all failed on commit dff8098 with this exact cause).

Verified not a monorepo/hoisting issue: require.resolve('typescript/package.json')
resolves fine from every app via pnpm's normal root-hoisting; only the
deep lib/typescript.js subpath fails, due to TS7's package.json exports
map (TS6 had no exports field at all, so the old deep import always worked).

Next.js merged an experimental fix today (vercel/next.js#95639,
experimental.useTypeScriptCli) but it isn't in a published canary yet
(latest is 16.3.0-canary.82, cut before the merge). Revisit once that
ships and stabilizes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
MakotoUwaya added a commit to MakotoUwaya/nijiviewer that referenced this pull request Jul 11, 2026
## 変更内容

### TypeScript パッケージ構成の変更
TypeScript 7.0 は Compiler API を同梱しないため、Next.js 等の
ツールとの互換性を保ちつつ TS 7 ネイティブバイナリを導入する
公式推奨の並存設定を採用。

- \	ypescript\: \
pm:@typescript/typescript6@^6.0.0\ に変更
  (Next.js 等 Compiler API を使用するツール用)
- \@typescript/native\: \
pm:typescript@^7.0.2\ を追加
  (ネイティブ Go 実装の tsc バイナリ、8〜12x 高速)

### tsconfig の修正 (TS 7.0 破壊的変更への対応)
- \packages/tsconfig/base.json\: moduleResolution \
ode\ → \�undler\
  (\
ode\/\
ode10\ は TS 7.0 で廃止)
- \packages/tsconfig/nextjs.json\: \ignoreDeprecations: 6.0\ を削除
  (base.json の deprecation を解消したため不要)
- \�pps/*/tsconfig.json\: \�aseUrl\ を削除 (TS 7.0 で廃止)
  paths はプロジェクトルート相対で引き続き機能する

### pnpm 設定の追加
- \minimumReleaseAge: 0\ をプロジェクトレベルで設定
  (グローバルの 7 日制限をリリース直後の TS パッケージに対して解除)

## 補足

Next.js 16 stable は現時点で TypeScript 7 ネイティブ統合未対応
(canary の実験的フラグのみ: vercel/next.js#95639)。
\
equire('typescript')\ は \@typescript/typescript6\ 経由で
TypeScript 6.0 API を提供し、型チェックは TS 6 で動作する。
sync-board-server 等 tsc を直接使用する場合は TS 7 ネイティブバイナリを使用。

Closes #1661

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ykzts added a commit to ykzts/ykzts that referenced this pull request Jul 15, 2026
Run next build typechecks via the project-local tsc CLI
(vercel/next.js#95639) and install typescript@7 as the single
compiler package, dropping the TS 6 side-by-side shim.

Assisted-by: Grok Build
lukesandberg pushed a commit that referenced this pull request Jul 15, 2026
## Summary

- add `experimental.useTypeScriptCli` so projects can explicitly run
their local `tsc` during `next build`, including TypeScript 7 while the
legacy JavaScript API is unavailable
- preserve the TypeScript API backend as the default, with TypeScript
6-compatible dependency installation and actionable TypeScript 7
migration guidance
- load effective compiler metadata through `tsc --showConfig`, preserve
inherited path origins, stream native diagnostics, redirect incremental
state, and forward worker termination to the compiler process tree
- document the experimental behavior and cover TypeScript 6/7, both
bundlers, raw diagnostics, full-project checking, dependency selection,
and cleanup

## Demo

```
pnpm build

> cna@0.1.0 build /Users/timneutkens/projects/sandbox/cna
> next build

▲ Next.js 16.3.0-canary.81 (Turbopack)
✓ Running next.config.ts took 23ms
- Cache Components enabled
- Experiments (use with caution):
  ✓ useTypeScriptCli

  Creating an optimized production build ...
✓ Compiled successfully in 3.9s
  Running TypeScript ...
app/page.tsx:8:3 - error TS2322: Type 'string' is not assignable to type 'number'.

8   return count++ + "abc";
    ~~~~~~

Found 1 error in app/page.tsx:8

Failed to type check.

Next.js build worker exited with code: 1 and signal: null
 ELIFECYCLE  Command failed with exit code 1.
```

## Verification

- `pnpm test-start-turbo
test/production/app-dir/typescript-cli/typescript-cli.test.ts`
- `pnpm test-start-webpack
test/production/app-dir/typescript-cli/typescript-cli.test.ts`
- `pnpm test-start-turbo
test/production/ci-missing-typescript-deps/index.test.ts`
- `pnpm test-dev-turbo
test/development/typescript-native-preview/index.test.ts`
- `pnpm test-start-turbo test/production/typescript-basic/index.test.ts`

<!-- NEXT_JS_LLM_PR -->

(cherry picked from commit a249dcb)
@ffMathy

ffMathy commented Jul 23, 2026

Copy link
Copy Markdown

What version will this release in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants