# TypeScript 7.0 Migration

**Package name changed**: `typescript` → `@typescript/native-preview`

## Install

**npm:** `npm install -D @typescript/native-preview@latest`
**yarn:** `yarn add -D @typescript/native-preview@latest`
**pnpm:** `pnpm add -D @typescript/native-preview@latest`

## Upgrade Checklist

1. Install `@typescript/native-preview`
2. **Rename `tsc` → `tsgo` in `package.json` scripts** (only on the `@typescript/native-preview` hop; if the project is still on the `typescript` package, the build command stays `tsc`). Do this immediately after install and BEFORE building. Edit each non-`node_modules` `package.json` by hand: replace script values where `tsc` is being invoked as the compiler — use the trailing-space guard (`"tsc "` → `"tsgo "`) so tool names like `tsc-alias` and `tscpaths` are untouched. The literal `"tsc"` with no arguments should be left alone unless you are certain it is only a compiler call; if unsure, ask the user. If the project keeps both packages installed (see Compatibility Note), some `tsc` invocations may intentionally target the classic compiler — review each rewritten line before committing.
3. Build the project (e.g., `tsgo --noEmit` or the project's existing build script) to check for errors
4. Fix any deprecated feature errors — all TS6 deprecations are fully removed in TS7

## Compatibility Note

If tools require the TypeScript API (linters, formatters, bundlers generating `.d.ts` files), keep both packages installed:
```bash
npm install -D typescript @typescript/native-preview
```
