Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions packages/typescript6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,39 @@ It also reexports the TypeScript 6 API, so you can import it in your code:
```ts
import ts6 from "@typescript/typescript6";
```

## Side-by-side with TypeScript 7

TypeScript 7 does not yet ship a stable programmatic API. For tools that still need the TypeScript 6 JS API (for example typescript-eslint), install this package alongside TypeScript 7 via npm aliases. See [Running Side-by-Side with TypeScript 6.0](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0).

Recommended layout:

```json
{
"devDependencies": {
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2"
}
}
```

## Package layout (`@typescript/old`)

This package depends on [`@typescript/old`](https://www.npmjs.com/package/@typescript/old) (`npm:typescript@^6`), which contains the real TypeScript 6 API implementation.

After install, `node_modules/typescript` (when aliased to this package) is a thin compatibility entrypoint. The large API bundle lives under:

```text
node_modules/@typescript/old/lib/typescript.js
```

If you use **path-based** ignores or excludes aimed at `node_modules/typescript/` (for example Jest `transformIgnorePatterns`, bundler excludes, or size checks), also cover `node_modules/@typescript/`. Otherwise tools may still process the ~8MB `@typescript/old` bundle.

Example (Jest):

```js
transformIgnorePatterns: [
"/node_modules/typescript/",
"/node_modules/@typescript/",
]
```