Loading...
Loading...
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.
npx skill4agent add secondsky/claude-skills typescript-migrationNEVER 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. Useonly as a temporary pause inside TS 6; it does NOT work in TS 7."ignoreDeprecations": "6.0"
scripts/detect-ts-version.shpackage.json5.xreferences/migration-playbooks.md6.xreferences/ts7-go-rewrite.md5.xreferences/ts-migrating-tool-guide.mdts-migratingscripts/audit-ts7-breakers.shbaseUrlnode10ES5| 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 | 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 |
| Change | Old default | TS 6 default | Fix |
|---|---|---|---|
| false | true | Set explicitly or fix errors |
| CommonJS | esnext | Set |
| ES3 | es2025 (floating) | Set explicitly |
| node10 | bundler | Set |
| inferred | | Set |
| all | | Set |
| false | true | Remove |
| false | true | Fix typos or set false for bundler CSS |
| true | false | — |
| varies | true | — |
target: es5downlevelIterationmoduleResolution: node | node10 | classicmodule: amd | umd | systemjs | nonebaseUrlesModuleInterop: falseallowSyntheticDefaultImports: falsealwaysStrict: falseoutFilemodule Foo {}assert { }/// <reference no-default-lib="true"/>tsc <file>--ignoreConfigts5to6references/ts6-breaking-changes.mdtypescriptnpm install -D typescriptpreserveConstEnumsstableTypeOrderingtrue--checkers N--builders N--singleThreaded@enum@class?!--checkers 8references/ts7-go-rewrite.mdpackage.json{
"devDependencies": {
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2"
}
}npx tsc@typescript/nativetypescript@typescript/typescript6tsc6scripts/detect-ts-version.shscripts/audit-ts7-breakers.shscripts/ts6-deprecation-scan.shtscreferences/migration-playbooks.mdts5to6 --fixBaseUrlts5to6 --fixRootDirscripts/compare-tsc7-tsc6.shtsctsc6.tsbuildinfo.tsbuildinfoaudit-ts7-breakers.sh@typescript/native-previewtypescriptreferences/unverified-claims.md--ts6-migration--keyofStringsOnlyts-migratingts5to6ts-migratingcompilerOptionnoUncheckedIndexedAccessstricterasableSyntaxOnlycompilerOptionannotatetscts-migrating check// @ts-migratingts-migratereferences/ts-migrating-tool-guide.md| Code | Meaning | Action |
|---|---|---|
| TS5011 | rootDir mismatch | Set |
| TS5101 | Option deprecated, stops in TS {ver} | Add |
| TS5102 | Option removed | Remove from tsconfig |
| TS5107 | Option=value deprecated | Same as TS5101 |
| TS5108 | Option=value removed | Remove |
| TS5111 | Migration info (baseUrl, node10) | See |
| TS5112 | tsc file-args + tsconfig present | Use |
| Load This File | When |
|---|---|
| Migrating to TS 6; need full PR-cited detail on each default change, deprecation, or syntax change |
| Adopting TS 7; need install detail, compat matrix, performance tables, known gaps |
| Checking whether a specific tool (typescript-eslint, ts-morph, ts-node, vite, webpack, vitest, etc.) works under TS 7 |
| Need ordered checklists for 5→6, 6→7, or 5→7-via-6 |
| User wants to enable a stricter compilerOption incrementally on an existing large codebase |
| Encountering a claim that contradicts official sources; verify before asserting |
typescripttsconfig.json@andrewbranch/ts5to6baseUrlrootDir@typescript/typescript6ts-migrating{
"devDependencies": {
"typescript": "^7.0.2",
"@typescript/typescript6": "^6.0.2"
},
"optionalHelpers": {
"@andrewbranch/ts5to6": "latest",
"ts-migrating": "latest"
}
}references/unverified-claims.md