Skip to content
Merged
Show file tree
Hide file tree
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
30 changes: 30 additions & 0 deletions docs/modules/tsc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
description: Modern alternatives to the tsc package for the TypeScript compiler
---

# Replacements for `tsc`

The npm package [`tsc`](https://github.com/basarat/tsc) is **not** the TypeScript compiler — it is a deprecated stub that prints _"This is not the tsc command you are looking for"_ when run.

## `typescript`

The [`typescript`](https://github.com/microsoft/TypeScript) package is the official compiler and provides the real `tsc` binary via `node_modules/.bin`. Replace `tsc` in your dependencies:

```json
{
"devDependencies": {
"tsc": "^2.0.4", // [!code --]
"typescript": "^5.9.0" // [!code ++]
}
}
```

Existing `"build": "tsc"` scripts work unchanged once `typescript` is installed. For `npx` or global installs, use `typescript` — not `tsc`:

```bash
npx tsc --init # [!code --]
npx --package typescript tsc --init # [!code ++]

npm install -g tsc # [!code --]
npm install -g typescript # [!code ++]
```
12 changes: 12 additions & 0 deletions manifests/preferred.json
Original file line number Diff line number Diff line change
Expand Up @@ -2642,6 +2642,12 @@
"replacements": ["neotraverse"],
"url": {"type": "e18e", "id": "traverse"}
},
"tsc": {
"type": "module",
"moduleName": "tsc",
"replacements": ["tsc"],
"url": {"type": "e18e", "id": "tsc"}
},
"tsup": {
"type": "module",
"moduleName": "tsup",
Expand Down Expand Up @@ -3484,6 +3490,12 @@
"type": "documented",
"replacementModule": "ts-graphviz"
},
"tsc": {
"id": "tsc",
"type": "removal",
"url": {"type": "e18e", "id": "tsc"},
"description": "The `tsc` npm package is not the TypeScript compiler. Remove it and install `typescript` instead."
},
"tsdown": {
"id": "tsdown",
"type": "documented",
Expand Down