typescript-6

Migrates and maintains TypeScript 6 projects by applying new compiler defaults and clearing deprecations.

2|Updated May 16, 2026
One-click install
npx skills add https://github.com/avbel/ai-skills --skill typescript-6-avbel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typescript-6
Source: https://github.com/avbel/ai-skills/tree/main/skills/typescript-6
Command: npx skills add https://github.com/avbel/ai-skills --skill typescript-6-avbel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Upgrading an existing codebase to TypeScript 6.0 breaks builds because of changed compiler defaults (strict mode, ESM modules, explicit types arrays) and a long list of deprecations that will be removed in TypeScript 7. This Skill guides the upgrade so the build stays green and the project is ready for the TypeScript 7 jump. ## Core Features & Use Cases - New Default Handling: Explains the changed tsconfig defaults (strict, module esnext, target es2025, types opt-in, rootDir) and how to pin old values to migrate one flag at a time. - Deprecation Cleanup: Covers every 6.0 deprecation — baseUrl, es5 target, downlevelIteration, node10 resolution, assert import attributes, outFile, and more — with concrete replacements. - New Feature Adoption: Documents #/ subpath imports, bundler+commonjs resolution, Temporal types, Map.getOrInsert, RegExp.escape, and the stableTypeOrdering migration flag. - Use Case: A team upgrades a Node.js service to typescript@^6.0.0 and the build fails on implicit any errors and assert import syntax. Use this Skill to pin legacy defaults, rewrite assert to with, replace baseUrl with #/ subpath imports, and validate output with stableTypeOrdering before moving to TypeScript 7. ## Quick Start Ask the agent to upgrade this project's tsconfig and source code to TypeScript 6, fixing all deprecation warnings and new strict-mode errors.

Frequently Asked Questions about typescript-6

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade a project to TypeScript 6 without breaking the build?▼

First pin the old defaults explicitly in tsconfig (strict: false, module: commonjs, target: es2020, types list, rootDir) so the upgrade is a no-op, then flip flags one at a time. Fix deprecations like assert imports and baseUrl before enabling strict mode.

What changed in TypeScript 6 compiler defaults?▼

TypeScript 6 enables strict by default, sets module to esnext, targets es2025, requires an explicit types array instead of auto-including all @types packages, enables noUncheckedSideEffectImports, and sets rootDir to the current directory.

Should I use TypeScript 6 or TypeScript 7 for a new project?▼

Use TypeScript 7 for new projects since it is the stable Go-native compiler. TypeScript 6 is a bridge release intended for existing projects or tools that still depend on the TypeScript 6 programmatic API.

Does TypeScript 6 support Node.js subpath imports?▼

Yes, TypeScript 6 resolves #/ subpath imports from package.json under moduleResolution node16, nodenext, or bundler. These are preferred over baseUrl and paths because they work at runtime in Node.js, not just at compile time.

Why does my TypeScript 6 build fail on assert import attributes?▼

The assert keyword in static and dynamic import attributes is deprecated in TypeScript 6 and removed in TypeScript 7. Rewrite assert { type: 'json' } as with { type: 'json' } in both static imports and dynamic import() options.

What is the stableTypeOrdering flag in TypeScript 6?▼

stableTypeOrdering forces deterministic union and intersection type ordering that matches the TypeScript 7 Go compiler. Use it to compare .d.ts output and type snapshots between versions so order-sensitive tests can be fixed before migrating.