Skip to content

feat(blog): TypeScript 7 native compiler performance post#8047

Merged
ankur-arch merged 5 commits into
mainfrom
feat/blog-typescript-7-native-compiler
Jul 10, 2026
Merged

feat(blog): TypeScript 7 native compiler performance post#8047
ankur-arch merged 5 commits into
mainfrom
feat/blog-typescript-7-native-compiler

Conversation

@ankur-arch

@ankur-arch ankur-arch commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What this adds

A succinct Prisma blog post on migrating a large TypeScript monorepo to the TypeScript 7 native (Go) compiler, cutting whole-repo type checking to roughly a third of the time (~3x faster) with no memory tuning. Built on top of the TypeScript 7 launch.

  • Post: apps/blog/content/blog/typescript-7-native-compiler-faster-type-checking/index.mdx
  • Cover: hero.svg + meta.png (1200×630, Eclipse house style, comparison-card motif)
  • Authors: Ankur Datta, Sampo Lahtinen (both have existing E-E-A-T bios)

Structure

Opens on the TS 7 release, then covers: what changed, how we migrated, where the speedup comes from, key takeaways, and a subtle Prisma ORM / Postgres / Compute callout.

Notes

  • No internal repo/service/package names or absolute internal timings; all framing is generic ("a large TypeScript monorepo") and relative.
  • Opened as a draft — prose still wants a human voice pass before publishing.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a new guide to TypeScript 7’s native Go-based compiler.
    • Documented the monorepo migration process, including configuration updates and compiler API alternatives.
    • Highlighted notable type-checking behavior changes that may affect existing code.
    • Included reported performance improvements for whole-repository type checking and guidance on when to migrate vs wait.

Adds a succinct post on migrating a large TypeScript monorepo to the
TypeScript 7 native (Go) compiler, cutting whole-repo type checking to
roughly a third of the time. Authors: Ankur Datta, Sampo Lahtinen.
Includes a simple on-brand hero/meta cover.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 10, 2026 2:08pm
docs Ready Ready Preview, Comment Jul 10, 2026 2:08pm
eclipse Ready Ready Preview, Comment Jul 10, 2026 2:08pm
site Ready Ready Preview, Comment Jul 10, 2026 2:08pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3ba4d671-86e8-430c-95d9-a3a1a69495d8

📥 Commits

Reviewing files that changed from the base of the PR and between d9fcb59 and 40818b6.

📒 Files selected for processing (1)
  • apps/blog/content/blog/typescript-7-native-compiler-faster-type-checking/index.mdx
✅ Files skipped from review due to trivial changes (1)
  • apps/blog/content/blog/typescript-7-native-compiler-faster-type-checking/index.mdx

Walkthrough

Changes

TypeScript 7 Migration Article

Layer / File(s) Summary
Article context and performance results
apps/blog/content/blog/typescript-7-native-compiler-faster-type-checking/index.mdx
Adds the post metadata, introduces TypeScript 7’s native compiler, reports type-checking results, and explains the runtime change.
Configuration and compiler API migration
apps/blog/content/blog/typescript-7-native-compiler-faster-type-checking/index.mdx
Documents tsconfig path updates and replacing TypeScript compiler API parsing with oxc-parser.
Type differences and adoption guidance
apps/blog/content/blog/typescript-7-native-compiler-faster-type-checking/index.mdx
Describes type-checking differences, removed memory tuning, unchanged areas, migration recommendations, and the concluding platform link.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: a blog post about TypeScript 7’s native compiler performance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@argos-ci

argos-ci Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 10, 2026, 2:14 PM

…w cover

- Restructure into numbers table, migration checklist, config/code diffs,
  sharp edges, what-didn't-improve, and a should-you-migrate decision block.
- Add show-don't-tell snippets (baseUrl diff, compiler-API before/after,
  typed-array + Buffer fixes, heap-flag removal, install command).
- Tighten the Prisma tie-in to a narrow generated-types argument.
- Redesign cover in the Rust-migration style: navy + TypeScript blue, TS mark
  paired with the Prisma wordmark, and a before/after 74s->24s bar chart.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tighten and de-jargon the prose throughout without dropping information:
punchier lead, clearer numbers caveat, simpler section transitions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sampolahtinen
sampolahtinen previously approved these changes Jul 10, 2026
@ankur-arch ankur-arch marked this pull request as ready for review July 10, 2026 13:37

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/blog/content/blog/typescript-7-native-compiler-faster-type-checking/index.mdx`:
- Around line 139-149: Revise the “Nothing changed at runtime. Every fix above
was type-level.” bullet in the “What TypeScript 7 did not change” section to
qualify the claim: note that module-resolution and AST-parser changes affect
build/tooling behavior, while application runtime behavior was validated as
unchanged (for example, in Prisma).
- Around line 24-31: Make the benchmark methodology in the TypeScript
performance comparison explicit: document the exact TypeScript 5.x and 7
versions, GitHub Actions runner label, dependency/build cache and warm-state
assumptions, number of measured runs, and how the median was calculated. Update
the surrounding benchmark text and table so the reported 3x improvement is
reproducible.
- Around line 168-170: The installation command should use the repository’s pnpm
package manager instead of npm and pin the exact TypeScript trial version rather
than using typescript@latest. Update the command in the article’s installation
instructions accordingly.
- Around line 118-121: Clarify the precondition around the `rawKey as
Uint8Array<ArrayBuffer>` cast in the `crypto.subtle.importKey` example: state
that `rawKey` must be backed by a plain `ArrayBuffer`, or replace the cast with
a conversion that copies the bytes into a fresh `Uint8Array`.
- Around line 141-166: Update the “Should you migrate now?” guidance to
explicitly mention editor integrations and framework workflows that may not yet
support TypeScript 7, including Vue, Svelte, Astro, and MDX. Add this caveat to
the appropriate “Wait a bit if” or migration text, noting that CLI type-checking
can use TypeScript 7 while IDE support may still require TypeScript 6.
- Around line 35-48: Clarify in “What we had to change” that TS 6-era
configuration prerequisites are separate from the native compiler migration:
explicitly mention removing baseUrl, accounting for rootDir defaulting to the
tsconfig.json directory, and declaring required packages because types no longer
auto-loads every `@types` package. Revise the checklist wording so readers
distinguish these config changes from native-port compatibility work.
- Line 68: Update the `vite-tsconfig-paths` guidance in the blog content to use
a precise supported version floor instead of the ambiguous “v5”; specify
`v5.1.4+` if that is the minimum tested release, or name the current stable
major, while retaining the note about older versions requiring `baseUrl`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e799a4d7-d6c0-4cd0-b8b3-1f510259a5f0

📥 Commits

Reviewing files that changed from the base of the PR and between 7ed0d25 and d9fcb59.

⛔ Files ignored due to path filters (2)
  • apps/blog/public/typescript-7-native-compiler-faster-type-checking/imgs/hero.svg is excluded by !**/*.svg
  • apps/blog/public/typescript-7-native-compiler-faster-type-checking/imgs/meta.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • apps/blog/content/blog/typescript-7-native-compiler-faster-type-checking/index.mdx

What TypeScript 7 did **not** change matters just as much:

- Bundling and the production build are no faster. Those run through Vite and esbuild, and `tsc` emits nothing in our setup.
- Nothing changed at runtime. Every fix above was type-level.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
- Nothing changed at runtime. Every fix above was type-level.
- Nothing changed at runtime, every fix above was type-level.


## What we had to change

Almost none of it was application code. Here is the checklist we followed, worst surprises last.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Too many sentences separated with unnecessary periods, and redudnant rhetorics.

Address reviewer comments (ankur-arch + CodeRabbit):
- Trim redundant wording; accept fluency suggestions in the lead, the
  "what it is", "what improved", and heading sections.
- Make the benchmark reproducible: pin TS versions (5.8.2 -> 7.0.2),
  note warm cache and median-of-several-runs on GitHub Actions.
- Separate TS 6-era config prerequisites (baseUrl/rootDir/types) from
  the native-port work so failures aren't blamed on the Go compiler.
- Pin vite-tsconfig-paths floor to v5.1.4+; clarify the rawKey cast
  assumes a plain ArrayBuffer.
- Add an editor/framework caveat (Vue, Svelte, Astro, MDX) to "wait a bit".
- Use pnpm and a pinned version for the trial install.
- Drop the off-topic Prisma Next tie-in; close with an honest Prisma
  Console note and a non-salesy pris.ly/pdp CTA.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants