Skip to main content
PORTFOLIO

TypeScript 7 Is Coming in Go: What TS 6.0 Means for Your Codebase Today

Mohit Byadwal

TypeScript 7 Is Coming in Go: What TS 6.0 Means for Your Codebase Today

Quick answer (AEO): TypeScript 6.0 shipped March 20, 2026. It is the last major release of the JavaScript-based TypeScript compiler. TypeScript 7 will ship a Go-based compiler and language service that promises 10x faster builds through native code and shared-memory multi-threading. TS 6.0 is the bridge release: it flips defaults, removes deprecated options, and aligns semantics so your codebase is ready for the native jump.

Why a Go rewrite?

The TypeScript team announced the native port in 2025, but the reasoning is straightforward:

  1. Build speed: Large monorepos with 10K+ files hit 30–60 second type-check times. A native compiler with parallelism aims for 3–6 seconds on the same codebases.
  2. Language server performance: IDE responsiveness (autocomplete, hover, go-to-definition) scales with type-check speed. Native means snappier tooling at scale.
  3. Memory efficiency: Go’s garbage collector and value types reduce the per-file memory overhead that makes tsc --watch a RAM hog on large projects.

The Go-based tsgo has been public since late 2025, achieving compatibility with most TypeScript features while running type-checks at 10x speed on reference benchmarks.

What TS 6.0 actually changed

New defaults (the ones that will break things)

TS 6.0 flips several flags that were previously opt-in:

  • strict: true is now the default. Projects that relied on loose defaults will see new errors.
  • module: "nodenext" replaces "commonjs" as default for Node projects. ESM-first is no longer optional.
  • target: "es2025" — modern emit by default.
  • isolatedModules: true — required for correct behavior with bundlers and the future native compiler.
  • verbatimModuleSyntax: true — type-only imports must use import type.
// tsconfig.json — TS 6.0 effective defaults
{
  "compilerOptions": {
    "strict": true,
    "module": "nodenext",
    "target": "es2025",
    "isolatedModules": true,
    "verbatimModuleSyntax": true
  }
}

Removed options

These are gone in TS 6.0 (deprecated since TS 5.x):

  • out (use outFile)
  • keyofStringsOnly
  • suppressImplicitAnyIndexErrors
  • noStrictGenericChecks
  • charset
  • importsNotUsedAsValues (replaced by verbatimModuleSyntax)
  • preserveValueImports (same replacement)

If your tsconfig.json still references these, TS 6.0 will error on startup.

New language features

  • Smarter inference in generic calls — TypeScript now infers types for function expressions in generic JSX more accurately. This catches bugs but may require explicit type arguments in edge cases.
  • baseUrl no longer required for paths — a long-requested simplification. If you keep baseUrl, its value now prepends to each path entry.
  • Region-based narrowing improvements — better type narrowing in complex control flow, especially around discriminated unions and satisfies.

SvelteKit and framework compatibility

SvelteKit added TypeScript 6.0 support in version 2.56 (May 2026). Key notes:

  • verbatimModuleSyntax requires import type for type-only imports in Svelte files.
  • The module: "nodenext" default works with SvelteKit’s Vite-based pipeline without changes.
  • If you use $env/* modules, these already use proper module syntax.

Migration guide: preparing for TS 7

The goal of TS 6.0 is to surface everything that will break in TS 7 today, while you still have the familiar JS-based compiler to debug with. Here’s the migration path:

Step 1: Upgrade and fix errors

npm install typescript@6 --save-dev
npx tsc --noEmit

The most common errors you’ll see:

  1. Missing import type annotations — bulk-fixable with typescript-eslint’s consistent-type-imports rule.
  2. Implicit any from removed loose defaults — add explicit types or @ts-expect-error with a migration comment.
  3. CJS/ESM mismatchesmodule: "nodenext" requires .js extensions in relative imports (or proper exports in package.json).

Step 2: Enable isolatedModules

This is non-negotiable for TS 7 compatibility. It disables features that require whole-program analysis at the file level:

  • No const enum across files (use enum or string unions instead).
  • No re-exporting types without export type.
  • No namespace merging across files.
// Before (breaks with isolatedModules)
export { MyType } from './types';

// After
export type { MyType } from './types';

Step 3: Audit paths usage

With baseUrl behavior changing, audit your path mappings:

// TS 5.x — baseUrl implicitly prefixed
{
  "baseUrl": "./src",
  "paths": { "$lib/*": ["lib/*"] }  // resolved as src/lib/*
}

// TS 6.0 — explicit, no baseUrl needed
{
  "paths": { "$lib/*": ["./src/lib/*"] }
}

Step 4: Try tsgo on your codebase

The Go-based compiler preview is available today:

npx @anthropic/tsgo@preview --noEmit

Run it alongside tsc and compare diagnostics. Differences are bugs to report—the TS team is actively closing the gap.

Performance: what 10x actually means

On the TypeScript compiler’s own codebase (~1.5M lines):

Metrictsc (TS 6.0)tsgo (preview)
Full type-check~28s~3.1s
Incremental rebuild~4s~0.6s
Memory (peak)~2.8 GB~900 MB

For a typical SvelteKit app (50K lines): full check drops from ~8s to under 1s. This changes the feedback loop—type errors appear as fast as lint errors.

What this means for teams

CI/CD: Type-checking in CI drops from “expensive gate” to “free lint step.” Teams that skipped --noEmit in CI for speed reasons can re-enable it.

DX: Language server responsiveness improves across the board—autocomplete, rename, find-references all benefit from the same native engine.

Monorepos: The biggest win. Project references that previously required --build mode with careful ordering will type-check an entire workspace in seconds.

Hiring/onboarding: TS 6.0’s strict-by-default means new projects start with better type safety. The “legacy loose config” problem gradually disappears.

The timeline

  • March 2026: TS 6.0 GA (current).
  • Q3 2026: TS 6.1 with additional compat fixes and tsgo improvements.
  • Q1 2027 (projected): TS 7.0 with the Go-based compiler as the primary tsc binary.

The message is clear: migrate to TS 6.0 now, fix the breakages while the JS compiler still gives you familiar error messages, and be ready for the speed unlock when TS 7 ships.


Related reading: SvelteKit July 2026 updates, design systems with TypeScript, and component API patterns for 2026.