Skip to content
Development
Skill

/typescript-migration

TypeScript version migration guide (5.x to 6 to 7, tsgo native port). Use for TS 6 tsconfig breaking changes, TS 7 Go rewrite rollout, or TS5xxx deprecation codes.

From plugin
secondsky-claude-skills
219183 skills42 agents62 commands2 MCP
Install
$ npx -y skills add secondsky/claude-skills --skill typescript-migration --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/typescript-migration

Context preview

The summary Claude sees to decide when to auto-load this skill.

TypeScript version migration guide (5.x to 6 to 7, tsgo native port). Use for TS 6 tsconfig breaking changes, TS 7 Go rewrite rollout, or TS5xxx deprecation codes.

SKILL.md

typescript-migration.SKILL.md
name: typescript-migration
description: "TypeScript version migration guide (5.x to 6 to 7, tsgo native port). Use for TS 6 tsconfig breaking changes, TS 7 Go rewrite rollout, or TS5xxx deprecation codes."
license: MIT

TypeScript Migration

Authoritative migration guide for TypeScript 5.x → 6 → 7 (native Go port). Sourced from Microsoft's official announcements.

Status

  • **Skill Status**: Production Ready
  • **Last Updated**: 2026-07-09
  • **TS 6.0 Released**: 2026-03-17 (Final) — last JavaScript-based release
  • **TS 7.0 Released**: 2026-07-08 — native Go port ("Corsa"), stable
  • **Authoritative Sources**:
  • TS 7.0 release: https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/
  • TS 6.0 beta: https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/
  • TS 6 → 7 diff tracker: https://github.com/microsoft/typescript-go/blob/main/CHANGES.md
  • ts5to6 tool: https://github.com/andrewbranch/ts5to6

The Golden Rule

> NEVER skip TypeScript 6. The only supported paths are **5.x → 6 → 7**. > > Skipping TS 6 produces a wall of hard errors because TS 7 removes everything TS 6 deprecated. Use `"ignoreDeprecations": "6.0"` only as a temporary pause inside TS 6; it does NOT work in TS 7.

Quick Triage (1 Minute)

1. **Detect current version** — run `scripts/detect-ts-version.sh` (reads `package.json`). 2. **Classify the path**:

  • `5.x` → start with `references/migration-playbooks.md` § "5.x → 6".
  • `6.x` → may go directly to TS 7 (see `references/ts7-go-rewrite.md`).
  • `5.x` wanting TS 7 → must go 5 → 6 → 7 (no shortcuts).
  • Intra-version strict-flag rollout (no version change) → see `references/ts-migrating-tool-guide.md` for the optional `ts-migrating` tool.

3. **Audit before changing anything** — run `scripts/audit-ts7-breakers.sh` to detect tooling that breaks under TS 7 (typescript-eslint, ts-morph, ts-node, Vue/Svelte/Astro/MDX/Angular templates, ts-patch, ttypescript, typia, `baseUrl`, `node10`, `ES5` target).

Project-Type Decision Matrix

| Project type | Recommendation | Why | |---|---|---| | Greenfield, no API-dependent tooling | Adopt TS 7 directly | Full speedup, no blockers | | Existing TS project, no special tooling | 5 → 6 → 7 sequentially | TS 6 surfaces every deprecation as a warning first | | Uses typescript-eslint / ts-morph / API consumers | 5 → 6 → 7 via `@typescript/typescript6` side-by-side | TS 7 has no programmatic API until 7.1 | | Vue / Svelte / Astro / MDX (Volar-based) | **Stay on TS 6** | Volar needs the programmatic API; not yet supported | | Angular with template type-checking | TS 7 for CLI + TS 6 for editor | Microsoft's official split workaround | | ts-patch / ttypescript / typia / custom AST transformers | **Stay on TS 6** until migrated to Oxc/SWC | Transformer API gone in TS 7 |

TS 6 — Top Breaking Changes (Quick View)

| Change | Old default | TS 6 default | Fix | |---|---|---|---| | `strict` | false | **true** | Set explicitly or fix errors | | `module` | CommonJS | **esnext** | Set `commonjs` if needed | | `target` | ES3 | **es2025** (floating) | Set explicitly | | `moduleResolution` | node10 | **bundler** | Set `nodenext` for Node targets | | `rootDir` | inferred | **`.` (tsconfig dir)** | Set `"rootDir": "./src"` | | `types` | all `@types` | **`[]`** | Set `"types": ["node"]` | | `esModuleInterop` | false | **true** | Remove `:false`; fix `import * as` → `import` | | `noUncheckedSideEffectImports` | false | **true** | Fix typos or set false for bundler CSS | | `libReplacement` | true | **false** | — | | `allowSyntheticDefaultImports` | varies | **true** | — |

Deprecated in 6, **HARD ERRORS in 7**: `target: es5`; `downlevelIteration`; `moduleResolution: node | node10 | classic`; `module: amd | umd | systemjs | none`; `baseUrl`; `esModuleInterop: false`; `allowSyntheticDefaultImports: false`; `alwaysStrict: false`; `outFile`; `module Foo {}` keyword; `assert { }` on imports; `/// <reference no-default-lib="true"/>`; `tsc <file>` + tsconfig present (use `--ignoreConfig`).

For full detail per change including PR citations, examples, and the official `ts5to6` codemod usage, load `references/ts6-breaking-changes.md`.

TS 7 — What Changed (Quick View)

  • Native Go port; the standard `typescript` npm package IS TS 7 (`npm install -D typescript`).
  • All TS 6 deprecations become hard errors (see table above).
  • **No programmatic Compiler API** in 7.0 — TS 7.1 will ship a new one. Affects ts-morph, ts-node, ts-jest, ts-loader, ts-patch, ttypescript, typia, typescript-eslint (use the side-by-side pattern below).
  • `preserveConstEnums` removed — always emits const enums.
  • `stableTypeOrdering` now `true` by default; cannot be turned off.
  • NEW flags: `--checkers N` (default 4), `--builders N`, `--singleThreaded`.
  • NEW breaking change: template literal types preserve Unicode code points (not UTF-16 code units).
  • NEW: JS file handling reworked (Closure-style `@enum`, `@class`, `?`, postfix `!` no longer special).
  • Performance (official, real OSS codebases): 7.7x–11.9x faster builds (up to 16.7x with `--checkers 8`); 6–26% lower memory.

Full install options, compatibility matrix, performance tables, and known issues in `references/ts7-go-rewrite.md`.

The Official Side-by-Side Pattern (TS 7 + TS 6 API)

Microsoft's recommended path for projects whose tooling depends on the TS Compiler API. Declare an alias in `package.json`:

{
  "devDependencies": {
    "@typescript/native": "npm:typescript@^7.0.2",
    "typescript": "npm:@typescript/typescript6@^6.0.2"
  }
}
  • `npx tsc` runs TS 7 (via the `@typescript/native` alias).
  • Tools importing `typescript` (typescript-eslint, ts-morph) transparently get TS 6's API via `@typescript/typescript6`.
  • A `tsc6` executable is also available if a TS 6 invocation is needed directly.
  • Remove this workaround once TS 7.1 ships the new API.

The 4-Step Standard Workflow

1. **Detect** — `scripts/detect-ts-version.sh` reports the installed ve

Read more
Ships withsecondsky-claude-skills

145 production-ready skills for Claude Code CLI 🔌 Platform / Harness Support These plugins ship as Claude Code marketplace plugins (.claude-plugin/ manifests) and Codex CLI plugins (.codex-plugin/ manifests).

Get the whole plugin

Other skills on secondsky-claude-skills.